Passing a parameter to PayPal and returning it

To sell the product, I created this "funnel" Destination page โ†’ payment page (external, in paypal) โ†’ thanks page (internal)

Everything is working fine, but I decided to add an affiliate program. affiliate program adds a new parameter to the process - this is referrer tracking.

So, I added a function on the landing page that gets the referrer ID from $ _GET and sets it as a cookie, now I can identify it if it returns or on the thank you page after payment - but - I have no way to associate it with its payment in paypal.

So, because the pay now button is actually a form, I thought there might be a way to add a hidden input field that will pass the paypal parameter - but the question remains - how can I get this parameter back so that could i track the deal?

+4
source share
1 answer

You can use the PayPal custom variable in your form HTML code. PayPal will send it back when your payment is completed.

<input type="hidden" name="custom" value="1234" />

Alternatively, you can set notify_url to provide a query string containing your value.

<input type="hidden" name="notify_url" value="http://example.com/ipn.php?aff=1234" />

+3
source

Source: https://habr.com/ru/post/1389672/


All Articles