I use the below older [?] method to create subscription payments.
And when client completed payment at PayPal, it is returned to my "thank you" url specified in the return
form variable.
By default PayPal sends to this confirmation page just a token
as GET variable, like thank-you.php?token=XXXXXXXXXXXXXXXXX
But I need to make subscription_id
available on this page too.
I seen one way to do this is by:
- enabling paypal auto return at
- I need to specify / hardcode my return URL there
- then I can enable Payment Data Transfer (PDT) right underneath auto return
- Now I receive a PDT Identity Token
- This PDT identity token can be used to make requests back to paypal on the "thank you" page, together with the
tx
now received in the URL and get from PayPal all transaction details that I need (includingsubscription_id
).
But if I have multiple webistes I don't want to set fixed settings at PayPal like that, specifying a default return URL there, etc.
The question: Is there a way (by API maybe) to get all transdaction details (I actually just need subscription_id
) just by the default GET variable ?token=XXXXXXXXXXXXXXXXX
that PayPal sends to the thank you page ? Without enabling all the above steps.
I have API keys too but they seem to perform different functions (get subscription details by subscription_id, cancel subscription by id, etc)
And I already use IPN in background but this need is a bit more client-side related.
Current payment form:
<form action="; method="post" enctype="multipart/form-data" target="_top">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="business" value="my-paypal-id">
<input type="hidden" name="lc" value="GB">
<input type="hidden" name="item_name" value="Some service purchase">
<input type="hidden" name="rm" value="2">
<input type="hidden" name="return" value=";>
<input type="hidden" name="cancel_return" value="/">
<input type="hidden" name="src" value="1">
<input type="hidden" name="a3" value="9.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_buynowCC_LG.gif:NonHosted">
<input type="submit" value="Subscribe">
</form>
I use the below older [?] method to create subscription payments.
And when client completed payment at PayPal, it is returned to my "thank you" url specified in the return
form variable.
By default PayPal sends to this confirmation page just a token
as GET variable, like thank-you.php?token=XXXXXXXXXXXXXXXXX
But I need to make subscription_id
available on this page too.
I seen one way to do this is by:
- enabling paypal auto return at
https://www.paypal/businessmanage/preferences/website
- I need to specify / hardcode my return URL there
- then I can enable Payment Data Transfer (PDT) right underneath auto return
- Now I receive a PDT Identity Token
- This PDT identity token can be used to make requests back to paypal on the "thank you" page, together with the
tx
now received in the URL and get from PayPal all transaction details that I need (includingsubscription_id
).
But if I have multiple webistes I don't want to set fixed settings at PayPal like that, specifying a default return URL there, etc.
The question: Is there a way (by API maybe) to get all transdaction details (I actually just need subscription_id
) just by the default GET variable ?token=XXXXXXXXXXXXXXXXX
that PayPal sends to the thank you page ? Without enabling all the above steps.
I have API keys too but they seem to perform different functions (get subscription details by subscription_id, cancel subscription by id, etc)
And I already use IPN in background but this need is a bit more client-side related.
Current payment form:
<form action="https://www.paypal/cgi-bin/webscr" method="post" enctype="multipart/form-data" target="_top">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="business" value="my-paypal-id">
<input type="hidden" name="lc" value="GB">
<input type="hidden" name="item_name" value="Some service purchase">
<input type="hidden" name="rm" value="2">
<input type="hidden" name="return" value="https://www.example/thanks">
<input type="hidden" name="cancel_return" value="https://www.example/">
<input type="hidden" name="src" value="1">
<input type="hidden" name="a3" value="9.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_buynowCC_LG.gif:NonHosted">
<input type="submit" value="Subscribe">
</form>
Share
Improve this question
edited Feb 18 at 7:35
VLAZ
29.1k9 gold badges62 silver badges84 bronze badges
asked Feb 17 at 22:04
adrianTNTadrianTNT
4,1025 gold badges35 silver badges40 bronze badges
1 Answer
Reset to default 0The HTML form integration in the question is very old, released more than 20 years ago, and should not be used for anything new.
Best solution is to integrate the current version of PayPal Subscriptions. It has an API.