This repository has been archived by the owner on Nov 29, 2019. It is now read-only.
forked from railsdog/spree-paypal-express
-
Notifications
You must be signed in to change notification settings - Fork 138
/
response-xml-one
137 lines (132 loc) · 9.32 KB
/
response-xml-one
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
example xml response for both info and auth stages
<GetExpressCheckoutDetailsResponse xmlns=\"urn:ebay:api:PayPalAPI\">
<Timestamp xmlns=\"urn:ebay:apis:eBLBaseComponents\">2009-08-11T08:34:45Z</Timestamp>
<Ack xmlns=\"urn:ebay:apis:eBLBaseComponents\">Success</Ack>
<CorrelationID xmlns=\"urn:ebay:apis:eBLBaseComponents\">ab1d12f6341a0</CorrelationID>
<Version xmlns=\"urn:ebay:apis:eBLBaseComponents\">57.0</Version>
<Build xmlns=\"urn:ebay:apis:eBLBaseComponents\">997644</Build>
<GetExpressCheckoutDetailsResponseDetails xmlns=\"urn:ebay:apis:eBLBaseComponents\" xsi:type=\"ebl:GetExpressCheckoutDetailsResponseDetailsType\">
<Token xsi:type=\"ebl:ExpressCheckoutTokenType\">EC-6B741617JU9239212</Token>
<PayerInfo xsi:type=\"ebl:PayerInfoType\">
<Payer xsi:type=\"ebl:EmailAddressType\">[email protected]</Payer>
<PayerID xsi:type=\"ebl:UserIDType\">QWVRDBQ88DR7N</PayerID>
<PayerStatus xsi:type=\"ebl:PayPalUserStatusCodeType\">unverified</PayerStatus>
<PayerName xsi:type=\"ebl:PersonNameType\">
<Salutation xmlns=\"urn:ebay:apis:eBLBaseComponents\">
</Salutation>
<FirstName xmlns=\"urn:ebay:apis:eBLBaseComponents\">Test</FirstName>
<MiddleName xmlns=\"urn:ebay:apis:eBLBaseComponents\">
</MiddleName>
<LastName xmlns=\"urn:ebay:apis:eBLBaseComponents\">User</LastName>
<Suffix xmlns=\"urn:ebay:apis:eBLBaseComponents\">
</Suffix>
</PayerName>
<PayerCountry xsi:type=\"ebl:CountryCodeType\">GB</PayerCountry>
<PayerBusiness xsi:type=\"xs:string\">
</PayerBusiness>
<Address xsi:type=\"ebl:AddressType\">
<Name xsi:type=\"xs:string\">Test User</Name>
<Street1 xsi:type=\"xs:string\">1 Main Terrace</Street1>
<Street2 xsi:type=\"xs:string\">
</Street2>
<CityName xsi:type=\"xs:string\">Wolverhampton</CityName>
<StateOrProvince xsi:type=\"xs:string\">West Midlands</StateOrProvince>
<Country xsi:type=\"ebl:CountryCodeType\">GB</Country>
<CountryName>United Kingdom</CountryName>
<PostalCode xsi:type=\"xs:string\">W12 4LQ</PostalCode>
<AddressOwner xsi:type=\"ebl:AddressOwnerCodeType\">PayPal</AddressOwner>
<AddressStatus xsi:type=\"ebl:AddressStatusCodeType\">Confirmed</AddressStatus>
</Address>
</PayerInfo>
<Custom xsi:type=\"xs:string\">R617411028</Custom>
<InvoiceID xsi:type=\"xs:string\">R617411028</InvoiceID>
<PaymentDetails xsi:type=\"ebl:PaymentDetailsType\">
<OrderTotal xsi:type=\"cc:BasicAmountType\" currencyID=\"GBP\">39.99</OrderTotal>
<ShippingTotal xsi:type=\"cc:BasicAmountType\" currencyID=\"GBP\">0.00</ShippingTotal>
<HandlingTotal xsi:type=\"cc:BasicAmountType\" currencyID=\"GBP\">0.00</HandlingTotal>
<TaxTotal xsi:type=\"cc:BasicAmountType\" currencyID=\"GBP\">6.00</TaxTotal>
<OrderDescription xsi:type=\"xs:string\">Goods from a Spree-based site</OrderDescription>
<Custom xsi:type=\"xs:string\">R617411028</Custom>
<InvoiceID xsi:type=\"xs:string\">R617411028</InvoiceID>
<ShipToAddress xsi:type=\"ebl:AddressType\">
<Name xsi:type=\"xs:string\">Test User</Name>
<Street1 xsi:type=\"xs:string\">1 Main Terrace</Street1>
<Street2 xsi:type=\"xs:string\">
</Street2>
<CityName xsi:type=\"xs:string\">Wolverhampton</CityName>
<StateOrProvince xsi:type=\"xs:string\">West Midlands</StateOrProvince>
<Country xsi:type=\"ebl:CountryCodeType\">GB</Country>
<CountryName>United Kingdom</CountryName>
<Phone xsi:type=\"xs:string\">
</Phone>
<PostalCode xsi:type=\"xs:string\">W12 4LQ</PostalCode>
<AddressID xsi:type=\"xs:string\">
</AddressID>
<AddressOwner xsi:type=\"ebl:AddressOwnerCodeType\">PayPal</AddressOwner>
<ExternalAddressID xsi:type=\"xs:string\">
</ExternalAddressID>
<AddressStatus xsi:type=\"ebl:AddressStatusCodeType\">Confirmed</AddressStatus>
</ShipToAddress>
<InsuranceTotal xsi:type=\"cc:BasicAmountType\" currencyID=\"GBP\">0.00</InsuranceTotal>
<ShippingDiscount xsi:type=\"cc:BasicAmountType\" currencyID=\"GBP\">0.00</ShippingDiscount>
<InsuranceOptionOffered xsi:type=\"xs:string\">false</InsuranceOptionOffered>
</PaymentDetails>
<UserSelectedOptions xsi:type=\"ebl:UserSelectedOptionType\">
<ShippingCalculationMode xsi:type=\"xs:string\">Callback</ShippingCalculationMode>
<InsuranceOptionSelected xsi:type=\"xs:string\">false</InsuranceOptionSelected>
<ShippingOptionIsDefault xsi:type=\"xs:string\">false</ShippingOptionIsDefault>
<ShippingOptionName xsi:type=\"xs:string\">
</ShippingOptionName>
</UserSelectedOptions>
</GetExpressCheckoutDetailsResponseDetails>
</GetExpressCheckoutDetailsResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>"
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"=>"[email protected]", "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}>
PARSE: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<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\">
<SOAP-ENV:Header>
<Security xmlns=\"http://schemas.xmlsoap.org/ws/2002/12/secext\" xsi:type=\"wsse:SecurityType\">
</Security>
<RequesterCredentials xmlns=\"urn:ebay:api:PayPalAPI\" xsi:type=\"ebl:CustomSecurityHeaderType\">
<Credentials xmlns=\"urn:ebay:apis:eBLBaseComponents\" xsi:type=\"ebl:UserIdPasswordType\">
<Username xsi:type=\"xs:string\">
</Username>
<Password xsi:type=\"xs:string\">
</Password>
<Signature xsi:type=\"xs:string\">A2VYNHC1wYRx0ZwMX6dXwoFDGTMnAYt4SmzCH6LS3nVKLszXCtL-rp9o</Signature>
<Subject xsi:type=\"xs:string\">
</Subject>
</Credentials>
</RequesterCredentials>
</SOAP-ENV:Header>
<SOAP-ENV:Body id=\"_0\">
<DoExpressCheckoutPaymentResponse xmlns=\"urn:ebay:api:PayPalAPI\">
<Timestamp xmlns=\"urn:ebay:apis:eBLBaseComponents\">2009-08-11T08:34:51Z</Timestamp>
<Ack xmlns=\"urn:ebay:apis:eBLBaseComponents\">Success</Ack>
<CorrelationID xmlns=\"urn:ebay:apis:eBLBaseComponents\">ad01596b089a</CorrelationID>
<Version xmlns=\"urn:ebay:apis:eBLBaseComponents\">57.0</Version>
<Build xmlns=\"urn:ebay:apis:eBLBaseComponents\">997644</Build>
<DoExpressCheckoutPaymentResponseDetails xmlns=\"urn:ebay:apis:eBLBaseComponents\" xsi:type=\"ebl:DoExpressCheckoutPaymentResponseDetailsType\">
<Token xsi:type=\"ebl:ExpressCheckoutTokenType\">EC-6B741617JU9239212</Token>
<PaymentInfo xsi:type=\"ebl:PaymentInfoType\">
<TransactionID>08Y81513KR775024S</TransactionID>
<ParentTransactionID xsi:type=\"ebl:TransactionId\">
</ParentTransactionID>
<ReceiptID>
</ReceiptID>
<TransactionType xsi:type=\"ebl:PaymentTransactionCodeType\">express-checkout</TransactionType>
<PaymentType xsi:type=\"ebl:PaymentCodeType\">instant</PaymentType>
<PaymentDate xsi:type=\"xs:dateTime\">2009-08-11T08:34:51Z</PaymentDate>
<GrossAmount xsi:type=\"cc:BasicAmountType\" currencyID=\"GBP\">39.99</GrossAmount>
<TaxAmount xsi:type=\"cc:BasicAmountType\" currencyID=\"GBP\">6.00</TaxAmount>
<ExchangeRate xsi:type=\"xs:string\">
</ExchangeRate>
<PaymentStatus xsi:type=\"ebl:PaymentStatusCodeType\">Completed</PaymentStatus>
<PendingReason xsi:type=\"ebl:PendingStatusCodeType\">none</PendingReason>
<ReasonCode xsi:type=\"ebl:ReversalReasonCodeType\">none</ReasonCode>
</PaymentInfo>
</DoExpressCheckoutPaymentResponseDetails>
</DoExpressCheckoutPaymentResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>"