there is a limit of 256 characters on the custom field for a Paypal html button. Is there a way to increase that limit or are there other fields that I can user (like custom1, custom2, other), etc...
Thank you
there is a limit of 256 characters on the custom field for a Paypal html button. Is there a way to increase that limit or are there other fields that I can user (like custom1, custom2, other), etc...
Thank you
Instead of sending a whole load of data via the custom field, save the data in a database, and send a record id. On ipn / cancel, retrieve the ID and update/delete the record.
To do this, 1st you need to change the button code to post to a php file on your own site not paypal, so the regular button code:
Becomes:
Note that a few fields are missing - cmd, business, item_name and amount, as we will generate those in php.
You could have the amount defined in the button html, but it would be better to have it defined in your database, then you can automatically reject orders where the user paid the wrong amount (by fiddling with the data sent to paypal - something they can currently do with your normal html button system).
In the php file, you collect the product info, save the order to the db, and generate the paypal data that would normally be included in the button form fields
Now you can crosscheck price against orderid in your ipn script:
And delete orders in your cancel page
You can also run a crom every hour/day/whatever to handle abandoned orders
You can use these:
First option field name and label. The os0 variable contains the corresponding value for this option field. For example, if on0 is size, os0 could be large.
Second option field name and label. The os1 variable contains the corresponding value for this option field. For example, if on1 is color then os1 could be blue. You can specify a maximum of 7 option field names (6 with Subscribe buttons) by incrementing the option name index (on0 through on6).