UPDATED to mark as [SOLVED]
I'm in the process of extending an existing PayPal checkout module to handle Instant Payment Notifications. This is where PayPal posts back details of the transaction they've processed once the user has completed it. The idea is that it enables me to verify that the user paid for what we sent them to PayPal for, and that the payment has cleared into our account OK. Once I've got this status back I can go ahead and fulfil their order.
I've got the first stage working OK - persistent storage. I now have a transaction class extending GalleryEntity, where I store my transaction details. I pass the transaction ID across to PayPal as their 'invoice' parameter.
Once the user has completed payment, PayPal will 'post' a bunch of information (including the transaction ID I passed them) back to a URL I specify. What I'm trying to work out is how to parse this generic, unstructured data in Gallery. The GalleryController doesn't seem appropriate as this is not a Gallery formatted form.
Can anyone suggest the correct way to code this? At the moment I'm starting to think of creating an actual PHP file... which seems like an ugly hack.
Thanks,
Matt.
Posts: 8601
you should use a GalleryController as that fits in with G2 modules.. you can use GalleryUtilities::getRequestVariablesNoPrefix() to get the values that have been posted and don't have the normal g2_ prefix.