1

I am working to implement a Paypal Express Checkout. I have setup a Paypal developer and sandbox account including a Personal Sandbox test account to act as the buyer. I am implementing a SOAP solution and so far have been able to complete the following steps

  1. Submit SetExpressCheckout request
  2. Use token from SetExpressCheckout response to redirect user to Paypal payment page
  3. Login to Paypal test using the Personal Sandbox test account. Once logged in I am taken to a 'Review your information' page. when I select 'Continue' on this page I end up back on the page I submitted as the Return URL.
  4. From the Return URL page I submit a GetExpressCheckoutDetails request. On the response the CheckoutStatus always has a value of PaymentActionNotInitiated.

I have tried several sandbox accounts (verified and not verified) and the results are always the same. What would be causing this.

Sample of the SetExpressCheckout request is below

<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>
iowa
  • 97
  • 1
  • 3
  • 7

1 Answers1

1

You will need to complete Doexpresscheckout to complete the payment. After payment is complete you will get CHECKOUTSTATUS=PaymentActionCompleted

Vimalnath
  • 6,373
  • 2
  • 26
  • 47
  • I do submit a DoExpressCheckoutPayment request right after the GetExpressCheckoutDetails request and the response keeps returning and 'Invalid Token' (Error code 10410). I have verified that I am submitting the DoExpressCheckoutPayment request with the token received under the return URL and so I was suspecting the error occurs because the payment is still in a PaymentActionNotInitiated status. I was expecting that when I login to Paypal I would be directed to a page where I can review and approve the transaction but this does not happen so I think it could be the root cause of the error. – iowa Feb 09 '15 at 04:02
  • once you login with paypal, you will be re-directed to your REturn URL, you just need to make sure that you are using the exact EC-token in DoEC as well. – Vimalnath Feb 09 '15 at 04:04
  • I have rechecked the EC-token value I pass under the DoExpressCheckoutPayment request and it matches what is returned on the return URL. As far as I can tell the EC-token value is the same value I received after the SetExpressCheckout. Still keep getting the Invalid token error. – iowa Feb 09 '15 at 04:55
  • can you provide me the correlation id that you get in response? – Vimalnath Feb 09 '15 at 04:59
  • 8115363d4a8a9 – iowa Feb 09 '15 at 05:03
  • You are not passing the token, we are getting empty token. `Unable to decrypt: Encrypted token is empty` Make sure your code sends a non-empty token. – Vimalnath Feb 09 '15 at 05:17
  • I am passing the following values SaleEC-34597487E7091741EEH25T9EPUPYJL – iowa Feb 09 '15 at 13:29
  • I found the root cause of the error. I used urn:DoExpressCheckoutPaymentRequestDetails instead of urn1:DoExpressCheckoutPaymentRequestDetails. I have corrected this now. – iowa Feb 10 '15 at 02:18