Split PE - Fix errors when using OXXO or Boleto #2947
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #2942
Changes proposed in this Pull Request:
While testing our Split PE with deferred intent changes, Global Step found there are errors when processing payments via Boleto or Oxxo on the checkout.
This error occurs because when we attempt to set the order's payment method ID, we fetch the UPE payment method's retrievable type. This aims to fetch the payment method to store on the order/subscription. Eg Bancontact > SEPA. Because Boleto and OXXO don't have a retrievable type and isn't reusable it returns null. In this case, we should return the payment the Boleto payment ID.
This PR fixes this issue.
get_upe_gateway_id_for_order()
now handles 3 cases:card
→stripe
bancontact
→sepa_debit
,ideal
→sepa_debit
etc.boleto
→boleto
Testing instructions
changelog.txt
andreadme.txt
(or does not apply)Post merge