Question

I know I can pass a field name "CUSTOM" which is supposed to come back in IPN can I pass two values as for example CUSTOM0 and CUSTOM1? or something like that

Était-ce utile?

La solution

You can't pass multiple fields, but you could pass multiple values in that 1 field if you need to. For example, you might include a value like...

val1|val2|val3|val4

Then in your IPN script, you could handle it like the following PHP sample...

$custom_values = explode('|',$_POST['custom']);

Then your custom values would all be available in the $custom_values array for you to use accordingly.

You could also send an NVP string or an XML string if that help you keep things straight, but keep in mind the CUSTOM parameter only accepts 256 characters.

If you need more than that, or if you just prefer, you could always save the data in a local database and then just pass a record ID in the CUSTOM field so that you can pull all those details back out of your database within your IPN script using that record ID.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top