Reputation: 10413
I know there are more than 20 questions about this, however none was helpful, and neither were the API docs nor some other paypal partner sites..
The XML/SOAP generated looks exactly like this:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="urn:ebay:apis:eBLBaseComponents"
xmlns:ns2="urn:ebay:api:PayPalAPI">
<SOAP-ENV:Header>
<ns2:RequesterCredentials>
<ns1:Credentials>
<ns1:Username>[FILTERED]</ns1:Username>
<ns1:Password>[FILTERED]</ns1:Password>
<ns1:Signature>[FILTERED]</ns1:Signature>
</ns1:Credentials>
</ns2:RequesterCredentials>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns2:SetExpressCheckoutReq>
<ns2:SetExpressCheckoutRequest>
<ns1:Version>121.0</ns1:Version>
<ns2:SetExpressCheckoutRequestDetails>
<ns1:ReturnUrl>http://localhost/foo</ns1:ReturnUrl>
<ns1:CancelUrl>http://localhost/bar</ns1:CancelUrl>
<ns1:PaymentDetails>
<ns1:OrderTotal currencyID="EUR">100000</ns1:OrderTotal>
</ns1:PaymentDetails>
</ns2:SetExpressCheckoutRequestDetails>
</ns2:SetExpressCheckoutRequest>
</ns2:SetExpressCheckoutReq>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
However, I get "Order Total is missing", and I can't wrap my head around why it does not work. Any hints for me? Thanks in advance!
Upvotes: 1
Views: 180
Reputation: 10413
Solved it, with help from Andrew Wilcox' answer.
The offending part in the XML is <ns2:SetExpressCheckoutRequest>
, which should be namespaced with ns1
instead of ns2
.
Upvotes: 0
Reputation: 1832
I hit the same problem. The issue is that SetExpressCheckoutRequestDetails
is in ns1 (eBLBaseComponents
), not ns2 (PayPalAPI
). Spent about six hours bashing my head in before finally figuring that out.
Upvotes: 0
Reputation: 11
I think your XML is not valid:
<
ns1
:OrderTotal currencyID="EUR">100000</
ns2
:OrderTotal>
It have to be ns1 in both tags.
Upvotes: 1