From what I understand, PayPal just verifies that the data we send to them matches the data they sent to us. Using $_POST and building the $variables array, we're not really adding or removing anything. However, the loop to build the array does not work with some PayPal APIs that have nested arrays such as Adaptive Payments. Why not just send them back the raw data they sent to us using php://input?
Patch incoming.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 1904046-2.patch | 1.2 KB | mglaman |
| #1 | commerce_paypal-post-to-stream-1904046-1.patch | 1.19 KB | Anonymous (not verified) |
Comments
Comment #1
Anonymous (not verified) commentedPatch attached. This code also should work against 1.0.
I don't see any issues with WPP or WPS, but I admit that I have not tested them. If someone can verify that this works with those implementations, then I might be able to send up a big patch for Adaptive Payments support.
Comment #2
mglamanReroll. This makes sense since we just need to prefix the validate command.
Comment #3
mglamanBased on their example, there would technically be more to do to properly construct the array rather than reading from $_POST
Comment #4
Anonymous (not verified) commentedComment #5
rszrama commentedThis seems pretty risky to change, imo. Especially in the 7.x branch where we don't even offer support for Adaptive Payments. (Does PayPal itself support that API any more?) Closing this out until there's a concrete use case and some form of testability.