Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-5106

PayPal Payments Standard: Add a textarea to allow manual mapping of payments

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.9.0
    • Fix Version/s: 5.11.0-b1
    • Component/s: Gateways
    • Labels:
      None

      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

        admin Paul Phillips created issue -
        admin Paul Phillips made changes -
        Field Original Value New Value
        Rank Ranked higher
        jonathan Jonathan Reissmueller made changes -
        Sprint 5.11.0 Sprint 1 [ 194 ]
        jonathan Jonathan Reissmueller made changes -
        Rank Ranked lower
        jonathan Jonathan Reissmueller made changes -
        Rank Ranked higher
        admin Paul Phillips made changes -
        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.





        abdy Abdy Franco made changes -
        Assignee Abdy Franco [ abdy ]
        abdy Abdy Franco made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        abdy Abdy Franco made changes -
        Remaining Estimate 0 minutes [ 0 ]
        Time Spent 1 hour, 59 minutes [ 7140 ]
        Worklog Id 16874 [ 16874 ]
        abdy Abdy Franco made changes -
        Time Spent 1 hour, 59 minutes [ 7140 ] 2 hours, 28 minutes [ 8880 ]
        Worklog Id 16879 [ 16879 ]
        abdy Abdy Franco made changes -
        Status In Progress [ 3 ] In Review [ 5 ]
        Resolution Fixed [ 1 ]
        jonathan Jonathan Reissmueller made changes -
        Sprint 5.10.0 final [ 194 ] 5.10.0 final, 5.11.0 Sprint 1 [ 194, 201 ]
        jonathan Jonathan Reissmueller made changes -
        Rank Ranked higher
        jonathan Jonathan Reissmueller made changes -
        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 ]
        abdy Abdy Franco made changes -
        Time Spent 2 hours, 28 minutes [ 8880 ] 2 hours, 45 minutes [ 9900 ]
        Worklog Id 17309 [ 17309 ]
        jonathan Jonathan Reissmueller made changes -
        Status In Review [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            abdy Abdy Franco
            Reporter:
            admin Paul Phillips
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 2 hours, 45 minutes
              2h 45m

                Agile