Closed (works as designed)
Project:
Commerce PayPal
Version:
7.x-1.x-dev
Component:
PayPal WPS
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
17 Nov 2011 at 10:26 UTC
Updated:
6 Feb 2013 at 04:29 UTC
I have a multilingual shop and I'm trying to configure an auto return URL in PayPal with no success.
Using the PayPal sandbox I was able to successfuly add the url http://mydomain.com/checkout which would redirect to the apropriate language and order confirmation page.
But on a live PayPal account, using the same URL - http://mydomain.com/checkout - just triggers the payment redirection to PayPal again...
Am I doing something wrong?
Comments
Comment #1
jrbienvenu commentedup
Comment #2
SandraVdv commentedWhere do you set the auto return URL in the Paypal sandbox?
Did you get this working for your live Paypal account?
Comment #3
andyg5000The patch in #1 of #1561594: Allow PayPal WPS order form data to be altered prior to form creation may help you achieve this. It allows you to alter the $data array that's used to create the form elements. You can override $data['return'] based on your specific criteria.
Comment #4
andyg5000I'm changing this to fixed since the patch I suggested has been committed and you should be able to customize this now. Feel free to reopen if you still cannot do what you are wanting to do.
Comment #5
SandraVdv commentedI still don't understand where we can customize this? Do we need to do this in a custom module with a hook_commerce_paypal_wps_order_form_alter() (if so, what do you need to alter? I'm not familiar with the Paypal API...) Or is it a setting somewhere in Drupal itself?
Comment #6
rszrama commentedUnfortunately, with auto return on, PayPal forces you to use a static URL to return the customer back to your store. We don't support that, and I'm not sure we can. We need to send someone back to a specific checkout URL for their order to be passed through to the completion page. It could be possible for us to update the WPS module to include a menu item used for auto return but only if they POST the same information to the auto return URL that they would post to the normal URL to send the customer back to the store. Honestly, I don't see why they don't just support the return URL we pass in the form. :-/
Theoretically you could send the customer to any page on the site and wait for the IPN to come in to update the order. You just won't be able to show any information on the page specific to their order, and depending on how fast the IPN comes through, they may not see the completed order in their user account for a while.
I tried to test this very quickly, but alas PayPal cannot validate the local URL I tried to use. Will have to test on a live server sometime.
Comment #7
rszrama commentedRenaming / postponing to match other feature requests.
Comment #8
vikasbook commentedThere is problem creating while I had practical try for this. How many got success to add support
Comment #9
rszrama commentedI actually just did some testing and found out that even if you enter a static URL in the PayPal Payments Standard settings form in your PayPal account, it will use whatever return URL you specify in the API request to setup the payment form. This means we can consider this working as designed, even if it isn't documented great within PayPal itself. I updated the FAQ with the recommendation to just use the main domain of the website, expecting it to be overridden to return to the proper checkout completion URL as passed in via the initial redirect: http://drupal.org/node/1902660#4