mike182uk / paypal-ipn-listener

A PayPal IPN (Instant Payment Notification) listener for PHP
MIT License
89 stars 31 forks source link

Use standard PHP functions for query string parsing #32

Closed willemstuursma closed 6 years ago

willemstuursma commented 6 years ago

We were using the InputStreamMessageFactory and got failed on all requests in the live environment (Sandbox worked fine).

These are the bytes that PayPal posted to us:

mc_gross=34.45&protection_eligibility=Eligible&address_status=confirmed&payer_id=REDACTED&tax=0.00&address_street=Examplestreet+123&payment_date...

This is what Guzzle was sending to verif:

cmd=_notify-validate&mc_gross=39.95&protection_eligibility=Eligible&address_status=confirmed&payer_id=REDACTED&tax=0.00&address_street=Examplestreet%2B123&payment_date...

We fixed it by switching to the ArrayMessageFactory, but we'd like to bring this PR to fix it with the InputStreamMessageFactory too.

seyfer commented 6 years ago

@mike182uk , please, merge.

mike182uk commented 6 years ago

Hey @willemstuursma

Thanks a lot for this. I can't believe i just didn't use the standard PHP functions in the first place 🤦‍♂️

I've merged your changes in and all looks good.

Changes are in v8.0.2 👍

willemstuursma commented 6 years ago

Thanks!