spree_paypal_express 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. data/.gitignore +7 -0
  2. data/.travis.yml +14 -0
  3. data/Gemfile +3 -0
  4. data/LICENSE +23 -0
  5. data/README.markdown +146 -0
  6. data/Rakefile +13 -0
  7. data/Versionfile +5 -0
  8. data/app/assets/images/paypal.png +0 -0
  9. data/app/assets/javascripts/admin/spree_paypal_express.js +0 -0
  10. data/app/assets/javascripts/store/spree_paypal_express.js +0 -0
  11. data/app/assets/stylesheets/admin/spree_paypal_express.css +0 -0
  12. data/app/assets/stylesheets/store/spree_paypal_express.css +0 -0
  13. data/app/controllers/spree/checkout_controller_decorator.rb +384 -0
  14. data/app/controllers/spree/paypal_express_callbacks_controller.rb +44 -0
  15. data/app/helpers/spree/checkout_helper_decorator.rb +7 -0
  16. data/app/models/spree/billing_integration/paypal_express.rb +3 -0
  17. data/app/models/spree/billing_integration/paypal_express_base.rb +62 -0
  18. data/app/models/spree/billing_integration/paypal_express_uk.rb +3 -0
  19. data/app/models/spree/log_entry_decorator.rb +3 -0
  20. data/app/models/spree/payment_decorator.rb +3 -0
  21. data/app/models/spree/paypal_account.rb +36 -0
  22. data/app/overrides/spree/shared/_order_details/add_paypal_details.html.erb.deface +16 -0
  23. data/app/views/spree/admin/payments/source_forms/_paypalexpress.html.erb +9 -0
  24. data/app/views/spree/admin/payments/source_forms/_paypalexpressuk.html.erb +9 -0
  25. data/app/views/spree/admin/payments/source_views/_paypalexpress.html.erb +110 -0
  26. data/app/views/spree/admin/payments/source_views/_paypalexpressuk.html.erb +110 -0
  27. data/app/views/spree/admin/paypal_payments/refund.html.erb +15 -0
  28. data/app/views/spree/checkout/payment/_paypalexpress.html.erb +3 -0
  29. data/app/views/spree/checkout/payment/_paypalexpressuk.html.erb +3 -0
  30. data/app/views/spree/shared/_paypal_express_checkout.html.erb +3 -0
  31. data/app/views/spree/shared/paypal_express_confirm.html.erb +23 -0
  32. data/capture-notes +28 -0
  33. data/config/initializers/paypal_express.rb +1 -0
  34. data/config/locales/en-GB.yml +30 -0
  35. data/config/locales/en.yml +32 -0
  36. data/config/routes.rb +25 -0
  37. data/db/migrate/20100224133156_create_paypal_accounts.rb +14 -0
  38. data/db/migrate/20120117182027_namespace_paypal_accounts.rb +5 -0
  39. data/lib/generators/spree_paypal_express/install/install_generator.rb +18 -0
  40. data/lib/spree/paypal_express_configuration.rb +5 -0
  41. data/lib/spree_paypal_express.rb +3 -0
  42. data/lib/spree_paypal_express/engine.rb +38 -0
  43. data/response-example-one +55 -0
  44. data/response-xml-one +137 -0
  45. data/spec/controllers/checkout_controller_spec.rb +323 -0
  46. data/spec/factories/address_factory.rb +13 -0
  47. data/spec/factories/order_factory.rb +11 -0
  48. data/spec/factories/ppx_factory.rb +5 -0
  49. data/spec/factories/state_factory.rb +5 -0
  50. data/spec/models/billing_integration/paypal_express_base_spec.rb +135 -0
  51. data/spec/requests/paypal_express_spec.rb +40 -0
  52. data/spec/spec_helper.rb +37 -0
  53. data/spec/support/authentication_helpers.rb +13 -0
  54. data/spec/support/controller_hacks.rb +33 -0
  55. data/spec/support/shared_connection.rb +12 -0
  56. data/spec/support/url_helpers.rb +7 -0
  57. data/spree_paypal_express.gemspec +24 -0
  58. metadata +224 -0
@@ -0,0 +1,3 @@
1
+ <a id="ppx" href="<%= paypal_payment_order_checkout_url @order, :payment_method_id => payment_method %>" style="text-align: center;">
2
+ <img src="https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" align="left" style="margin-right:7px;"/>
3
+ </a>
@@ -0,0 +1,3 @@
1
+ <a href="<%= paypal_payment_order_checkout_url @order, :payment_method_id => payment_method %>" style="text-align: center;">
2
+ <img src="https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" align="left" style="margin-right:7px;"/>
3
+ </a>
@@ -0,0 +1,3 @@
1
+ <a href="<%= paypal_checkout_orders_checkout_url @checkout.order, :integration_id => integration %>" style="text-align: center;">
2
+ <img src="https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" align="left" style="margin-right:7px;"/>
3
+ </a>
@@ -0,0 +1,23 @@
1
+ <div id="checkout" data-hook>
2
+ <%= render :partial => 'spree/shared/error_messages', :locals => { :target => @order } %>
3
+
4
+ <div class="row" data-hook="checkout_header">
5
+ <h1 class="columns three alpha" data-hook="checkout_title"><%= t(:checkout) %></h1>
6
+ <div class="columns thirteen omega" data-hook="checkout_progress"><%= checkout_progress %></div>
7
+ </div>
8
+
9
+ <p>
10
+ <%= raw t(:order_not_yet_placed) %>
11
+ </p>
12
+
13
+ <div class="row" data-hook="checkout_content">
14
+ <div class="columns <%= if @order.state != 'confirm' then 'alpha twelve' else 'alpha omega sixteen' end %>" data-hook="checkout_form_wrapper">
15
+ <%= render :partial => 'spree/shared/order_details', :locals => {:order => @order} -%>
16
+ <hr class="clear"/>
17
+ <div class="form-buttons">
18
+ <%= button_to t(:place_order), paypal_finish_order_checkout_url(@order, {:token => params[:token] , :PayerID => params[:PayerID], :payment_method_id => params[:payment_method_id] } ), :class => "button primary" %>
19
+ </div>
20
+ </div>
21
+
22
+ </div>
23
+ </div>
@@ -0,0 +1,28 @@
1
+
2
+ Results from a capture - how much do I need to keep? check...
3
+
4
+ ---
5
+ :tax_amount: "37.50"
6
+ :gross_amount: "249.00"
7
+ :payment_status: Pending
8
+ :gross_amount_currency_id: GBP
9
+ :authorization_id: 6WF137128R766191U
10
+ :pending_reason: payment-review
11
+ :receipt_id:
12
+ :transaction_id: 45D337153N9936001
13
+ :build: "962735"
14
+ :fee_amount: "8.67"
15
+ :reason_code: none
16
+ :correlation_id: cee300cb3a234
17
+ :fee_amount_currency_id: GBP
18
+ :transaction_type: express-checkout
19
+ :ack: Success
20
+ :timestamp: "2009-07-06T10:36:35Z"
21
+ :protection_eligibility: Ineligible
22
+ :parent_transaction_id: 6WF137128R766191U
23
+ :tax_amount_currency_id: GBP
24
+ :version: "57.0"
25
+ :payment_type: instant
26
+ :exchange_rate:
27
+ :payment_date: "2009-07-06T10:36:34Z"
28
+
@@ -0,0 +1 @@
1
+ require 'active_merchant/billing/gateways/paypal_express'
@@ -0,0 +1,30 @@
1
+ ---
2
+ en-GB:
3
+ edit_paypal_info: Edit Paypal Express Payment
4
+ paypal_payment: Paypal Express Payment
5
+ paypal_txn_id: Transaction Code
6
+ paypal_capture_complete: Paypal Transaction has been captured.
7
+ unable_to_capture_paypal: Unable to capture Paypal Transaction.
8
+ signature: Signature
9
+ order_not_yet_placed: "Your order has <strong>NOT</strong> been be placed, please review the details and click <strong>Place Order</strong> below to finalize your order."
10
+ paypal_payment_id: PayPal Payment ID
11
+ pending_reason: Pending Reason
12
+ result: Result
13
+ review: Review
14
+ no_shipping: No Shipping
15
+ paypal_account: PayPal Account
16
+ payer_id: Payer ID
17
+ payer_country: Country
18
+ payer_status: Status
19
+ comment: Comment
20
+ account_details: Account Details
21
+ finalize:
22
+ paypalexpress: Capture Payment
23
+ activerecord:
24
+ attributes:
25
+ paypal_payment:
26
+ amount: Amount
27
+ models:
28
+ paypal_payment:
29
+ one: PayPal Payment
30
+ other: PayPal Payments
@@ -0,0 +1,32 @@
1
+ ---
2
+ en:
3
+ ipn_transaction: IPN Transaction
4
+ unknown_transaction: Unknown Transaction
5
+ edit_paypal_info: Edit Paypal Express Payment
6
+ paypal_payment: Paypal Express Payment
7
+ paypal_txn_id: Transaction Code
8
+ paypal_capture_complete: Paypal Transaction has been captured.
9
+ unable_to_capture_paypal: Unable to capture Paypal Transaction.
10
+ signature: Signature
11
+ order_not_yet_placed: "Your order has <strong>NOT</strong> been be placed, please review the details and click <strong>Place Order</strong> below to finalize your order."
12
+ paypal_payment_id: PayPal Payment ID
13
+ pending_reason: Pending Reason
14
+ result: Result
15
+ review: Review
16
+ no_shipping: No Shipping
17
+ paypal_account: PayPal Account
18
+ payer_id: Payer ID
19
+ payer_country: Country
20
+ payer_status: Status
21
+ comment: Comment
22
+ account_details: Account Details
23
+ finalize:
24
+ paypalexpress: Capture Payment
25
+ activerecord:
26
+ attributes:
27
+ paypal_payment:
28
+ amount: Amount
29
+ models:
30
+ paypal_payment:
31
+ one: PayPal Payment
32
+ other: PayPal Payments
@@ -0,0 +1,25 @@
1
+ Spree::Core::Engine.routes.draw do
2
+ resources :orders do
3
+ resource :checkout, :controller => 'checkout' do
4
+ member do
5
+ get :paypal_checkout
6
+ get :paypal_payment
7
+ get :paypal_confirm
8
+ post :paypal_finish
9
+ end
10
+ end
11
+ end
12
+
13
+ match '/paypal_notify' => 'paypal_express_callbacks#notify', :via => [:get, :post]
14
+
15
+ namespace :admin do
16
+ resources :orders do
17
+ resources :paypal_payments do
18
+ member do
19
+ get :refund
20
+ get :capture
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,14 @@
1
+ class CreatePaypalAccounts < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :paypal_accounts do |t|
4
+ t.string :email
5
+ t.string :payer_id
6
+ t.string :payer_country
7
+ t.string :payer_status
8
+ end
9
+ end
10
+
11
+ def self.down
12
+ drop_table :paypal_accounts
13
+ end
14
+ end
@@ -0,0 +1,5 @@
1
+ class NamespacePaypalAccounts < ActiveRecord::Migration
2
+ def change
3
+ rename_table :paypal_accounts, :spree_paypal_accounts
4
+ end
5
+ end
@@ -0,0 +1,18 @@
1
+ module SpreePaypalExpress
2
+ module Generators
3
+ class InstallGenerator < Rails::Generators::Base
4
+ def add_migrations
5
+ run 'rake railties:install:migrations FROM=spree_paypal_express'
6
+ end
7
+
8
+ def run_migrations
9
+ res = ask "Would you like to run the migrations now? [Y/n]"
10
+ if res == "" || res.downcase == "y"
11
+ run 'rake db:migrate'
12
+ else
13
+ puts "Skiping rake db:migrate, don't forget to run it!"
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,5 @@
1
+ module Spree
2
+ class PaypalExpressConfiguration < Preferences::Configuration
3
+ preference :paypal_express_local_confirm, :boolean, :default => true
4
+ end
5
+ end
@@ -0,0 +1,3 @@
1
+ require 'spree_core'
2
+ require 'spree_auth'
3
+ require 'spree_paypal_express/engine'
@@ -0,0 +1,38 @@
1
+ module Spree::PaypalExpress; end
2
+ module SpreePaypalExpress
3
+ class Engine < Rails::Engine
4
+ engine_name 'spree_paypal_express'
5
+
6
+ config.autoload_paths += %W(#{config.root}/lib)
7
+
8
+ # use rspec for tests
9
+ config.generators do |g|
10
+ g.test_framework :rspec
11
+ end
12
+
13
+ initializer "spree.paypal_express.preferences", :before => :load_config_initializers do |app|
14
+ Spree::PaypalExpress::Config = Spree::PaypalExpressConfiguration.new
15
+ end
16
+
17
+ def self.activate
18
+ Dir.glob(File.join(File.dirname(__FILE__), "../../app/**/*_decorator*.rb")) do |c|
19
+ Rails.env.production? ? require(c) : load(c)
20
+ end
21
+ end
22
+
23
+ config.after_initialize do |app|
24
+ app.config.spree.payment_methods += [
25
+ Spree::BillingIntegration::PaypalExpress,
26
+ Spree::BillingIntegration::PaypalExpressUk
27
+ ]
28
+ end
29
+
30
+ # The install generator tries to do spree_paypal_express.classify => SpreePaypalExpres
31
+ # This fixes that 's' from getting chopped off
32
+ ActiveSupport::Inflector.inflections do |inflect|
33
+ inflect.singular 'express', 'express'
34
+ end
35
+
36
+ config.to_prepare &method(:activate).to_proc
37
+ end
38
+ end
@@ -0,0 +1,55 @@
1
+ example of an info fetch, for reference
2
+
3
+ PPPPPPPPPPPPP #<ActiveMerchant::Billing::PaypalExpressResponse:0x7f020cb75f60
4
+
5
+ @fraud_review=false,
6
+ @avs_result={"code"=>nil, "postal_match"=>nil, "street_match"=>nil, "message"=>nil},
7
+
8
+ @params={"country_name"=>"United Kingdom"
9
+ "name"=>"Test User"
10
+ "city_name"=>"Wolverhampton"
11
+ "insurance_option_selected"=>"false"
12
+ "insurance_total"=>"0.00"
13
+ "shipping_total_currency_id"=>"GBP"
14
+ "insurance_option_offered"=>"false"
15
+ "payer"=>"paulcc_1247500933_per@gmail.com"
16
+ "address_owner"=>"PayPal"
17
+ "payer_country"=>"GB"
18
+ "timestamp"=>"2009-08-11T08:12:11Z"
19
+ "correlation_id"=>"ed7b386bb3c6e"
20
+ "country"=>"GB"
21
+ "token"=>"EC-32483953BF188421W"
22
+ "street1"=>"1 Main Terrace"
23
+ "handling_total"=>"0.00"
24
+ "shipping_calculation_mode"=>"Callback"
25
+ "postal_code"=>"W12 4LQ"
26
+ "payer_business"=>nil, "salutation"=>nil, "invoice_id"=>"R884242533"
27
+ "street2"=>nil, "external_address_id"=>nil, "tax_total"=>"6.00"
28
+ "build"=>"997644"
29
+ "address_id"=>nil, "shipping_discount_currency_id"=>"GBP"
30
+ "version"=>"57.0"
31
+ "shipping_option_name"=>nil, "tax_total_currency_id"=>"GBP"
32
+ "shipping_discount"=>"0.00"
33
+ "payer_id"=>"QWVRDBQ88DR7N"
34
+ "shipping_option_is_default"=>"false"
35
+ "last_name"=>"User"
36
+ "address_status"=>"Confirmed"
37
+ "phone"=>nil, "payer_status"=>"unverified"
38
+ "custom"=>"R884242533"
39
+ "suffix"=>nil, "order_total"=>"39.99"
40
+ "order_total_currency_id"=>"GBP"
41
+ "order_description"=>"Goods from a Spree-based site"
42
+ "insurance_total_currency_id"=>"GBP"
43
+ "handling_total_currency_id"=>"GBP"
44
+ "ack"=>"Success"
45
+ "middle_name"=>nil, "state_or_province"=>"West Midlands"
46
+ "shipping_total"=>"0.00"
47
+ "first_name"=>"Test"},
48
+
49
+ @test=true,
50
+ @authorization=nil,
51
+ @message="Success",
52
+ @success=true,
53
+ @cvv_result={"code"=>nil, "message"=>nil}>
54
+
55
+
@@ -0,0 +1,137 @@
1
+ example xml response for both info and auth stages
2
+
3
+
4
+ <GetExpressCheckoutDetailsResponse xmlns=\"urn:ebay:api:PayPalAPI\">
5
+ <Timestamp xmlns=\"urn:ebay:apis:eBLBaseComponents\">2009-08-11T08:34:45Z</Timestamp>
6
+ <Ack xmlns=\"urn:ebay:apis:eBLBaseComponents\">Success</Ack>
7
+ <CorrelationID xmlns=\"urn:ebay:apis:eBLBaseComponents\">ab1d12f6341a0</CorrelationID>
8
+ <Version xmlns=\"urn:ebay:apis:eBLBaseComponents\">57.0</Version>
9
+ <Build xmlns=\"urn:ebay:apis:eBLBaseComponents\">997644</Build>
10
+
11
+ <GetExpressCheckoutDetailsResponseDetails xmlns=\"urn:ebay:apis:eBLBaseComponents\" xsi:type=\"ebl:GetExpressCheckoutDetailsResponseDetailsType\">
12
+ <Token xsi:type=\"ebl:ExpressCheckoutTokenType\">EC-6B741617JU9239212</Token>
13
+ <PayerInfo xsi:type=\"ebl:PayerInfoType\">
14
+ <Payer xsi:type=\"ebl:EmailAddressType\">paulcc_1247500933_per@gmail.com</Payer>
15
+ <PayerID xsi:type=\"ebl:UserIDType\">QWVRDBQ88DR7N</PayerID>
16
+ <PayerStatus xsi:type=\"ebl:PayPalUserStatusCodeType\">unverified</PayerStatus>
17
+ <PayerName xsi:type=\"ebl:PersonNameType\">
18
+ <Salutation xmlns=\"urn:ebay:apis:eBLBaseComponents\">
19
+ </Salutation>
20
+ <FirstName xmlns=\"urn:ebay:apis:eBLBaseComponents\">Test</FirstName>
21
+ <MiddleName xmlns=\"urn:ebay:apis:eBLBaseComponents\">
22
+ </MiddleName>
23
+ <LastName xmlns=\"urn:ebay:apis:eBLBaseComponents\">User</LastName>
24
+ <Suffix xmlns=\"urn:ebay:apis:eBLBaseComponents\">
25
+ </Suffix>
26
+ </PayerName>
27
+ <PayerCountry xsi:type=\"ebl:CountryCodeType\">GB</PayerCountry>
28
+ <PayerBusiness xsi:type=\"xs:string\">
29
+ </PayerBusiness>
30
+ <Address xsi:type=\"ebl:AddressType\">
31
+ <Name xsi:type=\"xs:string\">Test User</Name>
32
+ <Street1 xsi:type=\"xs:string\">1 Main Terrace</Street1>
33
+ <Street2 xsi:type=\"xs:string\">
34
+ </Street2>
35
+ <CityName xsi:type=\"xs:string\">Wolverhampton</CityName>
36
+ <StateOrProvince xsi:type=\"xs:string\">West Midlands</StateOrProvince>
37
+ <Country xsi:type=\"ebl:CountryCodeType\">GB</Country>
38
+ <CountryName>United Kingdom</CountryName>
39
+ <PostalCode xsi:type=\"xs:string\">W12 4LQ</PostalCode>
40
+ <AddressOwner xsi:type=\"ebl:AddressOwnerCodeType\">PayPal</AddressOwner>
41
+ <AddressStatus xsi:type=\"ebl:AddressStatusCodeType\">Confirmed</AddressStatus>
42
+ </Address>
43
+ </PayerInfo>
44
+ <Custom xsi:type=\"xs:string\">R617411028</Custom>
45
+ <InvoiceID xsi:type=\"xs:string\">R617411028</InvoiceID>
46
+ <PaymentDetails xsi:type=\"ebl:PaymentDetailsType\">
47
+ <OrderTotal xsi:type=\"cc:BasicAmountType\" currencyID=\"GBP\">39.99</OrderTotal>
48
+ <ShippingTotal xsi:type=\"cc:BasicAmountType\" currencyID=\"GBP\">0.00</ShippingTotal>
49
+ <HandlingTotal xsi:type=\"cc:BasicAmountType\" currencyID=\"GBP\">0.00</HandlingTotal>
50
+ <TaxTotal xsi:type=\"cc:BasicAmountType\" currencyID=\"GBP\">6.00</TaxTotal>
51
+ <OrderDescription xsi:type=\"xs:string\">Goods from a Spree-based site</OrderDescription>
52
+ <Custom xsi:type=\"xs:string\">R617411028</Custom>
53
+ <InvoiceID xsi:type=\"xs:string\">R617411028</InvoiceID>
54
+
55
+ <ShipToAddress xsi:type=\"ebl:AddressType\">
56
+ <Name xsi:type=\"xs:string\">Test User</Name>
57
+ <Street1 xsi:type=\"xs:string\">1 Main Terrace</Street1>
58
+ <Street2 xsi:type=\"xs:string\">
59
+ </Street2>
60
+ <CityName xsi:type=\"xs:string\">Wolverhampton</CityName>
61
+ <StateOrProvince xsi:type=\"xs:string\">West Midlands</StateOrProvince>
62
+ <Country xsi:type=\"ebl:CountryCodeType\">GB</Country>
63
+ <CountryName>United Kingdom</CountryName>
64
+ <Phone xsi:type=\"xs:string\">
65
+ </Phone>
66
+ <PostalCode xsi:type=\"xs:string\">W12 4LQ</PostalCode>
67
+ <AddressID xsi:type=\"xs:string\">
68
+ </AddressID>
69
+ <AddressOwner xsi:type=\"ebl:AddressOwnerCodeType\">PayPal</AddressOwner>
70
+ <ExternalAddressID xsi:type=\"xs:string\">
71
+ </ExternalAddressID>
72
+ <AddressStatus xsi:type=\"ebl:AddressStatusCodeType\">Confirmed</AddressStatus>
73
+ </ShipToAddress>
74
+
75
+ <InsuranceTotal xsi:type=\"cc:BasicAmountType\" currencyID=\"GBP\">0.00</InsuranceTotal>
76
+ <ShippingDiscount xsi:type=\"cc:BasicAmountType\" currencyID=\"GBP\">0.00</ShippingDiscount>
77
+ <InsuranceOptionOffered xsi:type=\"xs:string\">false</InsuranceOptionOffered>
78
+ </PaymentDetails>
79
+ <UserSelectedOptions xsi:type=\"ebl:UserSelectedOptionType\">
80
+ <ShippingCalculationMode xsi:type=\"xs:string\">Callback</ShippingCalculationMode>
81
+ <InsuranceOptionSelected xsi:type=\"xs:string\">false</InsuranceOptionSelected>
82
+ <ShippingOptionIsDefault xsi:type=\"xs:string\">false</ShippingOptionIsDefault>
83
+ <ShippingOptionName xsi:type=\"xs:string\">
84
+ </ShippingOptionName>
85
+ </UserSelectedOptions>
86
+ </GetExpressCheckoutDetailsResponseDetails>
87
+ </GetExpressCheckoutDetailsResponse>
88
+ </SOAP-ENV:Body>
89
+ </SOAP-ENV:Envelope>"
90
+ PPPPPPPPPPPPP #<ActiveMerchant::Billing::PaypalExpressResponse:0x7fd0e1d1a740 @fraud_review=false, @avs_result={"code"=>nil, "postal_match"=>nil, "street_match"=>nil, "message"=>nil}, @params={"name"=>"Test User", "city_name"=>"Wolverhampton", "insurance_option_selected"=>"false", "insurance_total"=>"0.00", "shipping_total_currency_id"=>"GBP", "insurance_option_offered"=>"false", "country_name"=>"United Kingdom", "payer"=>"paulcc_1247500933_per@gmail.com", "address_owner"=>"PayPal", "payer_country"=>"GB", "correlation_id"=>"ab1d12f6341a0", "timestamp"=>"2009-08-11T08:34:45Z", "country"=>"GB", "token"=>"EC-6B741617JU9239212", "street1"=>"1 Main Terrace", "handling_total"=>"0.00", "shipping_calculation_mode"=>"Callback", "postal_code"=>"W12 4LQ", "payer_business"=>nil, "salutation"=>nil, "invoice_id"=>"R617411028", "street2"=>nil, "external_address_id"=>nil, "tax_total"=>"6.00", "build"=>"997644", "shipping_discount_currency_id"=>"GBP", "shipping_option_name"=>nil, "version"=>"57.0", "tax_total_currency_id"=>"GBP", "address_id"=>nil, "shipping_discount"=>"0.00", "shipping_option_is_default"=>"false", "payer_id"=>"QWVRDBQ88DR7N", "address_status"=>"Confirmed", "last_name"=>"User", "phone"=>nil, "payer_status"=>"unverified", "custom"=>"R617411028", "suffix"=>nil, "order_total"=>"39.99", "order_total_currency_id"=>"GBP", "order_description"=>"Goods from a Spree-based site", "insurance_total_currency_id"=>"GBP", "handling_total_currency_id"=>"GBP", "ack"=>"Success", "middle_name"=>nil, "state_or_province"=>"West Midlands", "shipping_total"=>"0.00", "first_name"=>"Test"}, @test=true, @authorization=nil, @message="Success", @success=true, @cvv_result={"code"=>nil, "message"=>nil}>
91
+ PARSE: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
92
+ <SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:cc=\"urn:ebay:apis:CoreComponentTypes\" xmlns:wsu=\"http://schemas.xmlsoap.org/ws/2002/07/utility\" xmlns:saml=\"urn:oasis:names:tc:SAML:1.0:assertion\" xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\" xmlns:wsse=\"http://schemas.xmlsoap.org/ws/2002/12/secext\" xmlns:ebl=\"urn:ebay:apis:eBLBaseComponents\" xmlns:ns=\"urn:ebay:api:PayPalAPI\">
93
+ <SOAP-ENV:Header>
94
+ <Security xmlns=\"http://schemas.xmlsoap.org/ws/2002/12/secext\" xsi:type=\"wsse:SecurityType\">
95
+ </Security>
96
+ <RequesterCredentials xmlns=\"urn:ebay:api:PayPalAPI\" xsi:type=\"ebl:CustomSecurityHeaderType\">
97
+ <Credentials xmlns=\"urn:ebay:apis:eBLBaseComponents\" xsi:type=\"ebl:UserIdPasswordType\">
98
+ <Username xsi:type=\"xs:string\">
99
+ </Username>
100
+ <Password xsi:type=\"xs:string\">
101
+ </Password>
102
+ <Signature xsi:type=\"xs:string\">A2VYNHC1wYRx0ZwMX6dXwoFDGTMnAYt4SmzCH6LS3nVKLszXCtL-rp9o</Signature>
103
+ <Subject xsi:type=\"xs:string\">
104
+ </Subject>
105
+ </Credentials>
106
+ </RequesterCredentials>
107
+ </SOAP-ENV:Header>
108
+ <SOAP-ENV:Body id=\"_0\">
109
+ <DoExpressCheckoutPaymentResponse xmlns=\"urn:ebay:api:PayPalAPI\">
110
+ <Timestamp xmlns=\"urn:ebay:apis:eBLBaseComponents\">2009-08-11T08:34:51Z</Timestamp>
111
+ <Ack xmlns=\"urn:ebay:apis:eBLBaseComponents\">Success</Ack>
112
+ <CorrelationID xmlns=\"urn:ebay:apis:eBLBaseComponents\">ad01596b089a</CorrelationID>
113
+ <Version xmlns=\"urn:ebay:apis:eBLBaseComponents\">57.0</Version>
114
+ <Build xmlns=\"urn:ebay:apis:eBLBaseComponents\">997644</Build>
115
+ <DoExpressCheckoutPaymentResponseDetails xmlns=\"urn:ebay:apis:eBLBaseComponents\" xsi:type=\"ebl:DoExpressCheckoutPaymentResponseDetailsType\">
116
+ <Token xsi:type=\"ebl:ExpressCheckoutTokenType\">EC-6B741617JU9239212</Token>
117
+ <PaymentInfo xsi:type=\"ebl:PaymentInfoType\">
118
+ <TransactionID>08Y81513KR775024S</TransactionID>
119
+ <ParentTransactionID xsi:type=\"ebl:TransactionId\">
120
+ </ParentTransactionID>
121
+ <ReceiptID>
122
+ </ReceiptID>
123
+ <TransactionType xsi:type=\"ebl:PaymentTransactionCodeType\">express-checkout</TransactionType>
124
+ <PaymentType xsi:type=\"ebl:PaymentCodeType\">instant</PaymentType>
125
+ <PaymentDate xsi:type=\"xs:dateTime\">2009-08-11T08:34:51Z</PaymentDate>
126
+ <GrossAmount xsi:type=\"cc:BasicAmountType\" currencyID=\"GBP\">39.99</GrossAmount>
127
+ <TaxAmount xsi:type=\"cc:BasicAmountType\" currencyID=\"GBP\">6.00</TaxAmount>
128
+ <ExchangeRate xsi:type=\"xs:string\">
129
+ </ExchangeRate>
130
+ <PaymentStatus xsi:type=\"ebl:PaymentStatusCodeType\">Completed</PaymentStatus>
131
+ <PendingReason xsi:type=\"ebl:PendingStatusCodeType\">none</PendingReason>
132
+ <ReasonCode xsi:type=\"ebl:ReversalReasonCodeType\">none</ReasonCode>
133
+ </PaymentInfo>
134
+ </DoExpressCheckoutPaymentResponseDetails>
135
+ </DoExpressCheckoutPaymentResponse>
136
+ </SOAP-ENV:Body>
137
+ </SOAP-ENV:Envelope>"