Meaning of Auth in PayPal(Standard) Subscribe Button Return URL?
Asked Answered
C

1

8

I have a subscribe button (using PayPal Payments Standard Integration) in my WordPress website.

<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="business" value="FRG9AB9A93MUN">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="Premium Subscription">
<input type="hidden" name="item_number" value="321">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="rm" value="1">
<input type="hidden" name="return" value="http://example.com/success">
<input type="hidden" name="cancel_return" value="http://example.com/cancel">
<input type="hidden" name="src" value="1">
<input type="hidden" name="a3" value="299.00">
<input type="hidden" name="p3" value="1">
<input type="hidden" name="t3" value="M">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="bn" value="PP-SubscriptionsBF:btn_subscribeCC_LG.gif:NonHosted">
<input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_subscribeCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

I am testing the functionality using PayPal Sandbox. I use WordPress PayPal Framework Plugin (http://wordpress.org/extend/plugins/paypal-framework)

My Question

Upon successful payment(subscription), buyer returns to the return url with 'auth' and 'form_charset' (http://example.com/success/?auth=AtKlH609fYvJhW2wmFr9iMmXboz9JEB64TJjNpLVH8d0OlBbnOpn-TeeCvZT6VWOcoo8XG4GD0AeftCUMdNWCAQ&form_charset=UTF-8)

Can someone explain me the meaning of 'auth' and 'form_charset'? Can I use it to obtain further information about the transaction via NVP API? Then what should be the NVP API method I should use?

I can properly receive IPN messages on these transactions.

What I have done so far

I am conversant on PayPal Express Checkout Integration, capturing IPN msgs and processing them, etc.

I have read the NVP API methods, requests and responses in the PayPal Guide. https://cms.paypal.com/cms_content/CA/en_US/files/developer/PP_NVPAPI_DeveloperGuide.pdf

I went through some of the other PayPal Guides as well.

The following question mentions about 'encrypted variable named auth'. But it was not helpful for me. (Paypal sandbox return url)

This question also deals with return on success. (paypal redirect on successful checkout)

Confiding answered 31/12, 2012 at 13:46 Comment(1)
Did you find a way to get transaction details from auth param?Soapsuds
P
13

Change the "rm" parameter to "2". This causes a POST to the success page, with all transaction variables. Read more here.

Parley answered 3/1, 2013 at 13:4 Comment(2)
Thanks! pointing out 'rm' parameter helped me to understand the process better. Thanks.Confiding
Genius! I've been looking for a way to put extra data on the success page, without needing to use PDT. This is perfect! Thank you soooo much! Now I can validate that a call to my success page is from PayPal (well close enough), and not some random who's stumbled upon the page. I owe you a pint.Amarette

© 2022 - 2024 — McMap. All rights reserved.