Paypal Standard Redirect issue

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
8 years ago
Version: 3.5
SQL Server 2012
Windows Server 2012

The setup of Paypal sandbox and the application is as per the documentation. The process works well from order placement to taking the payment on the paypal site.  Once the payment is processed the redirection for Paypal standard end up on the Home Page and not on the Order Complete "Thank you" page.  All the information related to the payment is updated on the order record and I can see the updates via the admin function.

I have also configured Paypal Direct as a second payment method and this work fin end to end i.e. the order is placed, payment taken by paypal and I get to the order complete "thank you" page.  This difference is that I don't navigate away from the website in this instance.
8 years ago
This is how the paypal standard works.

If all things goes perfect and payment done success on paypal end then it will redirect to checkout completed page.
and if any error happen or somehow the payment is failed it will redirect to home page and it will add the reason on order notes of the orders.

so on admin you can trace the order notes to check what happen to that orders.
so its not any issue it is how the payment standard is working
8 years ago
I have checked the order notes and have the confirmation that payment is successful.  All the setup instructions state that if we specify the redirection URL the process would return back to the Order Complete Page (Thank you page) once the user clicks on the return to your store link on paypal.  

The behaviour should be consistent with all payment types, so for credit card the order complete (thank you page is displayed), when returning back from paypal standard payment method the user should be redirected to Order Complete (thank you page).

As per the documentation the setting for return url is http://www.yourstore.com/Plugins/PaymentPayPalStandard/PDTHandler
and as far as I can determine the user should be returned back to order complete page.
8 years ago
have you set the PdtValidateOrderTotal settings to True ??
if so it is verify the return amount and order total as well and if don't match it will redirect to home page

Also is order payment status is set as Paid ??
Did you find order notes regarding mark order as paid ??

is order has AuthorizationTransactionId ??
8 years ago
No PdtValidateOrderTotal is false

Order Payment Status is "Paid" and the order notes also state the order is paid

The AuthorizationTransactionID is also recorded.

Is there anyway of setting the logging level to debug mode so we can see what is happening with the paypal return request.
8 years ago
nitish.shah wrote:

Is there anyway of setting the logging level to debug mode so we can see what is happening with the paypal return request.


Its strange if its not redirect to checkout completed page.

For Logging its already add full return request on ordernotes with all return values from paypal.
but still you can add more logging on site manully to check what is happening.
8 years ago
Having put debug statements in  :

public bool GetPdtDetails(string tx, out Dictionary<string, string> values, out string response)
....
using (var sr = new StreamReader(req.GetResponse().GetResponseStream()))
                response = HttpUtility.UrlDecode(sr.ReadToEnd());

the response is "FAIL", I have checked the PDT Identity Token and this is set correctly as per the Paypal token value.

Not sure if anyone else is hitting this problem?


Because GetPdtDetails returns false the process returns to the home page and not order complete.
8 years ago
Getting further with debugging, the issue seems to be with ...

public ActionResult PDTHandler(FormCollection form)
        {
            var tx = _webHelper.QueryString<string>("tx");

in this case we are finding that tx is always null.

Is there anyone who can help determine why the PDTHandler when called from Paypal for paypal standard is not populated.
8 years ago
The problem was with setup of the sandbox token, here is what needs to be done to resolve the problem with using the sandbox

1.  Create the Sandbox account and login to the sandbox with this account
2.  Navigate to profile -> My Selling Preferences.  Under Selling preferences, click on the Website Payment Preferences
3.  Set auto Return : ON, specify the Return URL and set PDT:ON. Save the changes and you will get the Identity Token.  
4.  Specify this identity token in the PayPal Standard configuration in NOP Commerce

This solve d the problem for me.
7 years ago
Very helpful, thanks a bunch!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.