Details
Description
Background
When people migrate from WHMCS (or another solution) and they have PayPal Subscriptions active, we instruct them to create a redirect to translate those IPN calls to a URL Blesta can use. For example, we tell people to add the following to their .htaccess file:
Redirect 301 /modules/gateways/callback/paypal.php /callback/gw/1/paypal_payments_standard/
However, a typical IPN URL that is created by Blesta looks something like this:
/callback/gw/1/paypal_payments_standard/?client_id=12345
Note that the client_id is included in the IPN URL. Blesta uses this to match the payment to a particular client based on the internal ID. With these redirected IPN calls, no such client_id is provided.
In the absense of the client_id being provided, Blesta falls back to trying to match the payer_email to a client's email address. However, if there is no match, the payment cannot be recorded. This is common, because clients often pay with a different PayPal email than they sign up with.
Proposed Solution
Update the PayPal Payments Standard gateway to add a textarea field at the bottom, below the "Developer Mode" checkbox. Give it a label of "Payment Mapping (Advanced Use Only)". Add a tooltip that says. "Intended for use with PayPal Subscriptions that were created outside of Blesta. Map payer_email to internal Client ID, 1 per line. For example: email,client-id"
We should be able to store a lot of these under gateway_meta.value as it's a text field.
Then, when we receive an IPN call from PayPal, we do the folowing:
- If the URL contains the client_id, use this as we do currently (no change)
- If the URL does not contain the client_id, try to match the payer_email in the IPN request to a client-id as provided in the mapping data. If it exists, apply the payment.
- Finally, if the client_id is not provided in the IPN URL, and there is no mapping data match for the payer_email, try to match on client email as we do currently.
When saving the mapping data, make sure all payer_emails are unique, display an error if they are not:
Duplicate emails were found in your mapping data, remove duplicates and try again.
Activity
Field | Original Value | New Value |
---|---|---|
Rank | Ranked higher |
Sprint | 5.11.0 Sprint 1 [ 194 ] |
Rank | Ranked lower |
Rank | Ranked higher |
Description |
*Background*
When people migrate from WHMCS (or another solution) and they have PayPal Subscriptions active, we instruct them to create a redirect to translate those IPN calls to a URL Blesta can use. For example, we tell people to add the following to their .htaccess file: Redirect 301 /modules/gateways/callback/paypal.php /callback/gw/1/paypal_payments_standard/ However, a typical IPN URL that is created by Blesta looks something like this: /callback/gw/1/paypal_payments_standard/?client_id=12345 Note that the client_id is included in the IPN URL. Blesta uses this to match the payment to a particular client based on the internal ID. With these redirected IPN calls, no such client_id is provided. In the absense of the client_id being provided, Blesta falls back to trying to match the payer_email to a client's email address. However, if there is no match, the payment cannot be recorded. This is common, because clients often pay with a different PayPal email than they sign up with. *Proposed Solution* Update the PayPal Payments Standard gateway to add a textarea field at the bottom, below the "Developer Mode" checkbox. Give it a label of "Payment Mapping (Advanced Users Only)". Add a tooltip that says. "Intended for use with PayPal Subscriptions that were created outside of Blesta. Map payer_email to internal Client ID, 1 per line. For example: email,client-id" We should be able to store a lot of these under gateway_meta.value as it's a text field. Then, when we receive an IPN call from PayPal, we do the folowing: - If the URL contains the client_id, use this as we do currently (no change) - If the URL does not contain the client_id, try to match the payer_email in the IPN request to a client-id as provided in the mapping data. If it exists, apply the payment. - Finally, if the client_id is not provided in the IPN URL, and there is no mapping data match for the payer_email, try to match on client email as we do currently. When saving the mapping data, make sure all payer_emails are unique, display an error if they are not: Duplicate emails were found in your mapping data, remove duplicates and try again. |
*Background*
When people migrate from WHMCS (or another solution) and they have PayPal Subscriptions active, we instruct them to create a redirect to translate those IPN calls to a URL Blesta can use. For example, we tell people to add the following to their .htaccess file: Redirect 301 /modules/gateways/callback/paypal.php /callback/gw/1/paypal_payments_standard/ However, a typical IPN URL that is created by Blesta looks something like this: /callback/gw/1/paypal_payments_standard/?client_id=12345 Note that the client_id is included in the IPN URL. Blesta uses this to match the payment to a particular client based on the internal ID. With these redirected IPN calls, no such client_id is provided. In the absense of the client_id being provided, Blesta falls back to trying to match the payer_email to a client's email address. However, if there is no match, the payment cannot be recorded. This is common, because clients often pay with a different PayPal email than they sign up with. *Proposed Solution* Update the PayPal Payments Standard gateway to add a textarea field at the bottom, below the "Developer Mode" checkbox. Give it a label of "Payment Mapping (Advanced Use Only)". Add a tooltip that says. "Intended for use with PayPal Subscriptions that were created outside of Blesta. Map payer_email to internal Client ID, 1 per line. For example: email,client-id" We should be able to store a lot of these under gateway_meta.value as it's a text field. Then, when we receive an IPN call from PayPal, we do the folowing: - If the URL contains the client_id, use this as we do currently (no change) - If the URL does not contain the client_id, try to match the payer_email in the IPN request to a client-id as provided in the mapping data. If it exists, apply the payment. - Finally, if the client_id is not provided in the IPN URL, and there is no mapping data match for the payer_email, try to match on client email as we do currently. When saving the mapping data, make sure all payer_emails are unique, display an error if they are not: Duplicate emails were found in your mapping data, remove duplicates and try again. |
Assignee | Abdy Franco [ abdy ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Remaining Estimate | 0 minutes [ 0 ] | |
Time Spent | 1 hour, 59 minutes [ 7140 ] | |
Worklog Id | 16874 [ 16874 ] |
Time Spent | 1 hour, 59 minutes [ 7140 ] | 2 hours, 28 minutes [ 8880 ] |
Worklog Id | 16879 [ 16879 ] |
Status | In Progress [ 3 ] | In Review [ 5 ] |
Resolution | Fixed [ 1 ] |
Sprint | 5.10.0 final [ 194 ] | 5.10.0 final, 5.11.0 Sprint 1 [ 194, 201 ] |
Rank | Ranked higher |
Sprint | 5.10.0 final, 5.11.0 Sprint 1 [ 194, 201 ] | 5.10.0 final, 5.11.0 Sprint 1, 5.11.0 Sprint 1.5 [ 194, 201, 205 ] |
Time Spent | 2 hours, 28 minutes [ 8880 ] | 2 hours, 45 minutes [ 9900 ] |
Worklog Id | 17309 [ 17309 ] |
Status | In Review [ 5 ] | Closed [ 6 ] |