I'm integrating a .Net application with PayPal Express Checkout.
I'm using the PayPal SDK for .Net to call SetExpressCheckout and DoExpressCheckoutPayment.
I'm using the In-Context javascript API as described in the Advanced In-Context JavaScript settings
PaymentAction is Sale, SolutionType is Sole
We've had occasions where we received a 10486 error. PayPal's recommendation for recovering from this is to redirect back to PayPal with the existing payment token
Upon receiving this error code, redirect the buyer back to PayPal
using the existing Express Checkout token. On the PayPal page, the
buyer is presented with an error message explaining the reason for the
decline.
I have 2 questions about PayPal's recommendation:
Doing the redirect
How should I redirect the buyer back to PayPal? Initially I just use the following JS:
paypal.checkout.startFlow(data.token);
Should I do the use same JS again after I receive the 10486 error, or use some other method?
Where is the error message?
I've already tried using the approach above, as well as manually just redirecting to
https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=[TOKEN]
After the redirect I don't see the error message explaining the reason for the decline that the PayPal instructions say I should.
Am I doing something wrong?
Related
I have set the IPN hook to a PHP script on my site using
https://www.sandbox.paypal.com/cgi-bin/customerprofileweb?cmd=_profile-ipn-notify
I have set a return page at
https://www.sandbox.paypal.com/businessmanage/preferences/website
Neither works. IPN is not called, transaction succeeds, but i am not redirected to "thank you" page.
Could you suggest what is wrong?
The page I use for payments at sandbox:
https://market.snowcron.com/cabinet_paypal.php
This question asks about 2 separate issues
For the IPN issue, check your sandbox IPN history at https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_display-ipns-history , and test your IPN listener using the simulator
As for the redirect URL you have set, this only applies to old-style HTML form payment standard integrations. That setting has absolutely no effect for newer API or JavaScript SDK based integrations. Any redirection you wish to perform should be in the onApprove javascript function.
I'm using Paypal REST to process payments.
Recently I've got INSTRUMENT_DECLINED error from my user.
User has been billed from his credit card and redirected to Success endpoint.
API returned INSTRUMENT_DECLINED error, so my UI has shown Error 500.
I can't see the payment in paypal admin ui.
User lost his money. He feels upset.
It seems to be a common problem, handled well in Classic API:
https://developer.paypal.com/docs/classic/express-checkout/ht_ec_fundingfailure10486/
So in Classic API if I get an error, I just redirect a user back to Paypal, so that Paypal guides him. Paypal knows what happened and what to do, it's ok.
But I can't find any docs about processing error recovery in REST API.
Should I hack into classic express checkout with my REST-gathered data?
Or is there any proper way to make the good user experience in case of a problem on paypal's side?
I want to use paypal express checkout in my application in minimum steps
like:
click on paypal button-> verify account on paypal-> back with token to my application ->
confirm the payment->successful msg ->credited into my account(user not redirect to paypal) only get success message on application
currently paypal confirm the payment of user in paypal site but i want it to my application
and user only once redirect to paypal site for account verification rest all process done in to my backhand side of asp.net application
I guess that's the way Paypal works.And where is a call to getExpressCheckoutDetails.
If you want paypal shipping details on your webpage you need to make call to this method.
It will return you shipping detail and then create a button for say "Pay" and call doExpressCheckout method of PaypalAPI to complete your transaction :D
You can try this as a starting point: https://paypal-labs.com/integrationwizard/ecpaypal/main.php (SSL is expired or invalid so you'll have to add security exception, but it works)
I was trying to use the express checkout php api. Everything is working well in the sandbox environment. My question is regarding security.
After payment the sample code redirects to GetExpressCheckout.php?token=...$PayerID=.....; But after clicking "confirm payment" in my site and logging in to paypal account (did not confirm payment in paypal); I directly opened the same page in another tab, and it showed payment successful (which is not the case). Is there a way to prevent this or am I missing some thing.
I'm not following exactly what you're trying to say here.
The process needs to be...
1) Call SetExpressCheckout to retrieve your token and redirect to PayPal accordingly.
2) PayPal will return the user back to your ReturnURL if they confirm payment, at which point you can call GetExpressCheckoutDetails (optionally) and DoExpressCheckoutPayment to finalize the payment.
Not until DECP is completed does any transaction actually take place. The success message you're seeing probably came from GetExpressCheckoutDetails, which does nothing more than retrieve the buyer/order info so that you can finalize the payment on your site.
I developed a small payment process that uses the Express Checkout API. I'm testing the code with my friend's account with $1. My payment process is redirecting to the live paypal site, he enters his information and pays, he is redirected to my confirmation thank you page, but I never receive funds. I've checked my API credentials in the code, and they are OK. I'm receiving a token and paypal payerid info on my confirmation screen. What could be the problem?
Thank you in advance.
See my answer in Why is DoExpressCheckoutPayment required for Paypal?
In order to use Express Checkout, you must call at least the following API calls:
1. SetExpressCheckout -- to set up the transaction.
2. DoExpressCheckoutPayment -- to finalize the transaction.
If you don't call DoExpressCheckoutPayment on the 'Thank you' page, the transaction is not completed. This is by design to allow for greater flexibility
Express Checkout is intended as a drop-in solution in your own checkout process. After Express Checkout redirects you back to your site, you're supposed to show an order confirmation where the buyer can review his/her final order details before initiating a button / link which initiates the final DoExpressCheckoutPayment API call. This is why DoExpressCheckoutPayment is required.