Object
# File lib/braintree/transparent_redirect_gateway.rb, line 15 def confirm(query_string) params = @gateway.transparent_redirect.parse_and_validate_query_string query_string confirmation_gateway = { TransparentRedirect::Kind::CreateCustomer => :customer, TransparentRedirect::Kind::UpdateCustomer => :customer, TransparentRedirect::Kind::CreatePaymentMethod => :credit_card, TransparentRedirect::Kind::UpdatePaymentMethod => :credit_card, TransparentRedirect::Kind::CreateTransaction => :transaction }[params[:kind]] @gateway.send(confirmation_gateway)._do_create("/transparent_redirect_requests/#{params[:id]}/confirm") end
# File lib/braintree/transparent_redirect_gateway.rb, line 28 def create_credit_card_data(params) Util.verify_keys(CreateCreditCardSignature, params) params[:kind] = TransparentRedirect::Kind::CreatePaymentMethod _data(params) end
# File lib/braintree/transparent_redirect_gateway.rb, line 34 def create_customer_data(params) Util.verify_keys(CreateCustomerSignature, params) params[:kind] = TransparentRedirect::Kind::CreateCustomer _data(params) end
# File lib/braintree/transparent_redirect_gateway.rb, line 57 def transaction_data(params) Util.verify_keys(TransactionSignature, params) params[:kind] = TransparentRedirect::Kind::CreateTransaction transaction_type = params[:transaction] && params[:transaction][:type] unless ]sale credit].include?(transaction_type) raise ArgumentError, "expected transaction[type] of sale or credit, was: #{transaction_type.inspect}" end _data(params) end
# File lib/braintree/transparent_redirect_gateway.rb, line 67 def update_credit_card_data(params) Util.verify_keys(UpdateCreditCardSignature, params) unless params[:payment_method_token] raise ArgumentError, "expected params to contain :payment_method_token of payment method to update" end params[:kind] = TransparentRedirect::Kind::UpdatePaymentMethod _data(params) end
# File lib/braintree/transparent_redirect_gateway.rb, line 76 def update_customer_data(params) Util.verify_keys(UpdateCustomerSignature, params) unless params[:customer_id] raise ArgumentError, "expected params to contain :customer_id of customer to update" end params[:kind] = TransparentRedirect::Kind::UpdateCustomer _data(params) end
Generated with the Darkfish Rdoc Generator 2.