Problem/Motivation
While testing the IPN support I noticed the module was reporting the data received from PayPal before sending the it back to them for validating the IPN, but it never went through the whole process of creating the Entity for populating the donations view and sending emails to the donor and to the admin.
Proposed resolution
I found out one issue was on the request to PayPal for IPN validation that was returning HTTP 400 Bad Request
.
After researching a bit I noticed the issue was a matter of using the right HTTP version (1.1 instead of 1.0). The reason is the fact that the header "Host" is part of the HTTP 1.1 definition (and it is necessary for dealing with PayPal).
With the HTTP request working properly, I noticed there was an extra space character in the end of ever line from the response, leading the comparison that checks if it says "VERIFIED" to fail (response was bringing "VERIFIED ").
For dealing with this, I've changed the comparison and trimmed the response.
Links for the reference:
https://tools.ietf.org/html/rfc7230#section-5.4
http://www8.org/w8-papers/5c-protocols/key/key.html#SECTION0007000000000...
Comment | File | Size | Author |
---|---|---|---|
#3 | paypal-ipn-not-properly-processed-2826757-3.patch | 943 bytes | dscl |
Comments
Comment #2
dscl CreditAttribution: dscl as a volunteer and at DevBrains commentedAdding extra issue on the VERIFIED comparison.
Comment #3
dscl CreditAttribution: dscl as a volunteer and at DevBrains commentedHere is the patch for both issues.
Hope it helps.
Comment #5
dscl CreditAttribution: dscl as a volunteer and at DevBrains commentedPatch merged into 7.x-1.x-dev.