included, for reference later

This commit is contained in:
paulcc 2009-08-11 14:35:06 +01:00
parent eac0ed0236
commit 00543bc7d9
2 changed files with 192 additions and 0 deletions

55
response-example-one Normal file
View File

@ -0,0 +1,55 @@
example of an info fetch, for reference
PPPPPPPPPPPPP #<ActiveMerchant::Billing::PaypalExpressResponse:0x7f020cb75f60
@fraud_review=false,
@avs_result={"code"=>nil, "postal_match"=>nil, "street_match"=>nil, "message"=>nil},
@params={"country_name"=>"United Kingdom"
"name"=>"Test User"
"city_name"=>"Wolverhampton"
"insurance_option_selected"=>"false"
"insurance_total"=>"0.00"
"shipping_total_currency_id"=>"GBP"
"insurance_option_offered"=>"false"
"payer"=>"paulcc_1247500933_per@gmail.com"
"address_owner"=>"PayPal"
"payer_country"=>"GB"
"timestamp"=>"2009-08-11T08:12:11Z"
"correlation_id"=>"ed7b386bb3c6e"
"country"=>"GB"
"token"=>"EC-32483953BF188421W"
"street1"=>"1 Main Terrace"
"handling_total"=>"0.00"
"shipping_calculation_mode"=>"Callback"
"postal_code"=>"W12 4LQ"
"payer_business"=>nil, "salutation"=>nil, "invoice_id"=>"R884242533"
"street2"=>nil, "external_address_id"=>nil, "tax_total"=>"6.00"
"build"=>"997644"
"address_id"=>nil, "shipping_discount_currency_id"=>"GBP"
"version"=>"57.0"
"shipping_option_name"=>nil, "tax_total_currency_id"=>"GBP"
"shipping_discount"=>"0.00"
"payer_id"=>"QWVRDBQ88DR7N"
"shipping_option_is_default"=>"false"
"last_name"=>"User"
"address_status"=>"Confirmed"
"phone"=>nil, "payer_status"=>"unverified"
"custom"=>"R884242533"
"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}>

137
response-xml-one Normal file
View File

@ -0,0 +1,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\">paulcc_1247500933_per@gmail.com</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"=>"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}>
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>"