Pregunta

I have an iOS app which accepts paypal payment. On successful payment I receive the following proof of payment in the app

"proof_of_payment" =     {
    "adaptive_payment" =         {
        "app_id" = "APP-blablabla";
        "pay_key" = "AP-blablabla";
        "payment_exec_status" = COMPLETED;
        timestamp = "2013-12-13T18:33:30.182-08:00";
    };
};

I then use the adaptive payment API to verify the proof of payment on the server side using the following API call

curl https://svcs.sandbox.paypal.com/AdaptivePayments/PaymentDetails \
-H "X-PAYPAL-SECURITY-USERID: blablabla.gmail.com" \
-H "X-PAYPAL-SECURITY-PASSWORD: blablabla" \
-H "X-PAYPAL-SECURITY-SIGNATURE: blablabla" \
-H "X-PAYPAL-REQUEST-DATA-FORMAT: NV" \
-H "X-PAYPAL-RESPONSE-DATA-FORMAT: NV" \
-H "X-PAYPAL-APPLICATION-ID: APP-blablabla" \
-d "payKey=AP-blablabla&requestEnvelope.errorLanguage=en_US"

As per API documentation here: https://developer.paypal.com/webapps/developer/docs/classic/api/adaptive-payments/PaymentDetails_API_Operation/ I expect the senderEmail in the response but I don't get any!?

Below is the response I get from the adaptive API

responseEnvelope.timestamp=2013-12-13T18%3A35%3A40.412-08%3A00&
responseEnvelope.ack=Success&
responseEnvelope.correlationId=af33730da88fb&
responseEnvelope.build=7935900&
cancelUrl=http%3A%2F%2Fwww.paypal.com&
currencyCode=USD&
paymentInfoList.paymentInfo(0).transactionId=blablabla&
paymentInfoList.paymentInfo(0).transactionStatus=COMPLETED&
paymentInfoList.paymentInfo(0).receiver.amount=2.00&
paymentInfoList.paymentInfo(0).receiver.email=blablabla%40gmail.com&
paymentInfoList.paymentInfo(0).receiver.primary=false&
paymentInfoList.paymentInfo(0).receiver.paymentType=SERVICE&
paymentInfoList.paymentInfo(0).receiver.accountId=blablabla&
paymentInfoList.paymentInfo(0).refundedAmount=0.00&
paymentInfoList.paymentInfo(0).pendingRefund=false&
paymentInfoList.paymentInfo(0).senderTransactionId=blablabla&
paymentInfoList.paymentInfo(0).senderTransactionStatus=COMPLETED&
returnUrl=http%3A%2F%2Fwww.paypal.com&status=COMPLETED&
payKey=AP-blablabla&
actionType=PAY&
feesPayer=EACHRECEIVER&
sender.accountId=blablabla&
sender.useCredentials=true 

Question: Any ideas what I could do to get the senderEmail address? Note: This is all using SANDBOX accounts

¿Fue útil?

Solución

Hello Xenophin Lategan,

Unfortunately, right now, the way the mSDK is set up the senderEmail isn't returned. The v2 of the mSDKs that will be released next year are moving the PayPal payments over to the REST platform instead of Adaptive Payments so you will see some changes with that. Also, because of that, the enhancements to the current integration with the Adaptive Platform are going to be very limited. As a workaround to your issue, you can utilize the GetTransactionDetails API call with the transaction ID and get the payer information that way.

https://developer.paypal.com/webapps/developer/docs/classic/api/merchant/GetTransactionDetails_API_Operation_NVP/

Thank you for your patience.

Sincerely, Cory Merchant Technical Support
PayPal an eBay Company

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top