Passing Custom Form Data to PayPal and getting it returned
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am fluent in PHP and have written many registration forms for events.
These, in their simplest forms, are flat pages with a series of textboxes and combo boxes collecting information. On submit, the form data gets pumped into a database for use on booking the delegate on the event.
However, I now have a part that possibly (although now always) requires a payment.
I have opted to use Paypal to take credit card or paypal payments.
The way I would like this to work would be...(deep breath)
1. Customer fills data into the registration page and clicks the submit button, the script determines if a payment is required.
2a. If no payment required, the information is quirted into the database.
2b. If payment required, the script redirects the user to Paypal for payment processing ALONG with all the data in the registration form.
3b. Paypal does its business and takes the payment and returns back to a page on my website with ALL the registration form data AND a payment status (success/failure/etc).
4b. On success, squirt data into database.
I have spent 2 days going through the paypal documentation, and maybe I'm looking in the wrong place, but I cannot see where I pass my form stuff to paypal. I don't want to add the data to my database UNTIL payment is taken.
Can someone help, or point me in the direction of some documentation as to how I can achieve this.
Many thanks,
Marty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello ccl-live,
Welcome to the Forums.
I must say this is not my area of expertise, you may want to check out the PayPal Developer Forums to see if someone there is able to help you out with your question. I hope this helps.
Misty

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is only one parameter that you can use for custom data with Website Payments Standard and that's "custom".
Simply pass in you custom data in <input type="hidden" name="custom" value="your custom data here">
You can retrieve the value for 'custom' by polling through PayPal PDT (https://www.paypal.com/pdt/) or getting the data POST'ed to you by PayPal, using PayPal IPN (https://www.paypal.com/ipn/).
Note: You normally wouldn't want to insert the custom data itself, but only a unique identifier that you could refer back to internally when the buyer is returned back to your site.
Feel free to log a ticket with Merchant Technical Services for any further assistance on this. Our address is https://www.paypal.com/mts/
For technical assistance with PayPal merchant product offerings, please file a ticket at https://www.paypal.com/mts/

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Trying to change the return to merchant button in Merchant services (Archive)
- website payments pro return error 10762 in Merchant services (Archive)
- Please and Thank You - OLD Return Address on Shipping Label in Shipping (Archive)
- Website Payments Standard Shipping for International While Still Passing US amount in Merchant services (Archive)
- custom amount on buy now button in Merchant services (Archive)