Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add specific payment descriptions logic for payment types #6651

Merged
merged 5 commits into from
Aug 24, 2023

Conversation

KenLSM
Copy link
Contributor

@KenLSM KenLSM commented Aug 23, 2023

Problem

Descriptions sent to Stripe during stripe.paymentIntents.create are not properly retrieved after we've released payment by products and variable payments.

Closes FRM-1286

Solution

Identified that there are three different categories of payments to retrieve the description field from.

Fixed -> payments_field.description // due to legacy reasons, fixed payments uses descriptions instead of name
Variable -> payments_field.name
Products -> selected products

Breaking Changes

  • No - this PR is backwards compatible

Before & After Screenshots

Due to the sensitivity of the data in the screenshots, please see comment in ticket.

Tests

Hint: use this url to get the payment item on stripe dashboard quickly https://dashboard.stripe.com/test/connect/accounts/<acct_id>/payments/<pi_id>

Variable Payment Form

  • Create a variable payment form, set the name as "tis but a variable", and description as "description"
    • Complete making a payment
    • Ensure that payment summary displays "tis but a variable"
    • Ensure that description on Stripe Payment item is "tis but a variable"

Products Payment Form

  • Create a Products payment form, create two products
    • Set first item as "item1", "description1" for name and description, and multiple quantity as "OFF"
    • Set second item as "item2", "description2" for name and description, and multiple quantity of 1 to 99
    • Set payment settings as multiple products
    • Complete making a payment with two selected items, and 2nd item to be quantity 10
    • Ensure that payment summary displays "item1 x 1, item2 x 10"
    • Ensure that description on Stripe Payment item is "item1 x 1, item2 x 10"

Copy link
Contributor

@foochifa foochifa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly LGTM! Thanks for the tests too! Just some nits below!

@KenLSM KenLSM merged commit ee77d07 into develop Aug 24, 2023
20 checks passed
@KenLSM KenLSM deleted the fix/payment-intent-description branch August 24, 2023 05:34
@KenLSM KenLSM mentioned this pull request Aug 31, 2023
92 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants