我正在努力实现Paypal Express Checkout。我已经建立了一个贝宝开发者和沙盒帐户,包括一个个人沙盒测试帐户,作为买家。我正在实现一个SOAP解决方案,到目前为止已经能够完成以下步骤
- 提交SetExpressCheckout请求
- 使用SetExpressCheckout响应中的令牌将用户重定向到Paypal支付页面
- 使用个人沙盒测试帐户登录Paypal测试。登录后,我会进入"查看您的信息"页面。当我在这个页面上选择"继续"时,我会回到我作为返回URL提交的页面
- 从返回URL页面,我提交了一个GetExpressCheckoutDetails请求。在响应中,CheckoutStatus的值始终为PaymentActionNotInitiated
我尝试了几个沙箱帐户(已验证和未验证),结果总是一样的。是什么导致了这种情况。
SetExpressCheckout请求的示例低于
<soapenv:Envelope>
<soapenv:Header>
<urn:RequesterCredentials>
<urn1:Credentials>
<urn1:Username>sandbox_username</urn1:Username>
<urn1:Password>sandbox_passwword</urn1:Password>
<urn1:Signature>sandbox_signature</urn1:Signature>
</urn1:Credentials>
</urn:RequesterCredentials>
</soapenv:Header>
<soapenv:Body>
<urn:SetExpressCheckoutReq>
<urn:SetExpressCheckoutRequest
<urn1:DetailLevel>ReturnAll</urn1:DetailLevel>
<urn1:ErrorLanguage>en_US</urn1:ErrorLanguage>
<urn1:Version>119.0</urn1:Version>
<urn1:SetExpressCheckoutRequestDetails>
<urn1:OrderTotal currencyID="EUR">13.08</urn1:OrderTotal>
<urn1:ReturnURL>https://url/paypalreturnurl.htm</urn1:ReturnURL>
<urn1:CancelURL>https://url/paypalcancelurl.htm</urn1:CancelURL>
<urn1:OrderDescription>Invoice Num 31650</urn1:OrderDescription>
<urn1:InvoiceID>31650</urn1:InvoiceID>
<urn1:PaymentAction>Sale</urn1:PaymentAction>
</urn1:SetExpressCheckoutRequestDetails>
</urn:SetExpressCheckoutRequest>
</urn:SetExpressCheckoutReq>
</soapenv:Body>
</soapenv:Envelope>
您需要完成Doexpresscheckout才能完成付款。付款完成后您将获得CHECKOUTSTATUS=PaymentActionCompleted