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(payment_link): render SDK for status requires_payment_method #2887

Merged
merged 2 commits into from
Nov 16, 2023

Conversation

kashif-m
Copy link
Contributor

@kashif-m kashif-m commented Nov 16, 2023

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

  • Fix bug for not allowing the SDK to render for PaymentIntent status requires_payment_method
  • Remove modern JS features (ES6 and ES6+) to support older browsers

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

Test Case

use the curl below to generate payment_link and check whether the payment link is opening test few transactions aswell

curl --location 'https://sandbox.hyperswitch.io/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: snd_RrnVYK6c3puJkhYm3seCFACIpJuKjG5ZkydUP9fbPFAqVYiYCaSgQXqYQLsTwMUM' \ --data '{ "amount": 3423, "currency": "USD", "confirm": false, "customer_id": "sahkal", "return_url":"https://google.com", "description": "For selling Tea", "order_details":[{ "product_name":"Tea", "quantity":1, "amount":10, "product_img_link":"https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg" }, { "product_name":"Tea", "quantity":1, "amount":10, "product_img_link":"https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg" }, { "product_name":"Tea", "quantity":1, "amount":10, "product_img_link":"https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg" }, { "product_name":"Tea", "quantity":1, "amount":10, "product_img_link":"https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg" }, { "product_name":"Tea", "quantity":1, "amount":10, "product_img_link":"https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg" }], "payment_link_object": { "link_expiry" : "2025-10-09T16:23:10Z", "merchant_custom_domain_name": null, "custom_merchant_name": "sahkal" } }'

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible
  • I added a CHANGELOG entry if applicable

refactor(payment_link): support older browsers by removing usage of arrow functions, backtick literals
@kashif-m kashif-m requested a review from sahkal November 16, 2023 09:01
@kashif-m kashif-m self-assigned this Nov 16, 2023
@kashif-m kashif-m requested a review from a team as a code owner November 16, 2023 09:01
refactor(payment_link): handle status for requires_capture and partially_captured
@sahkal sahkal added S-waiting-on-review Status: This PR has been implemented and needs to be reviewed C-bug Category: Bug labels Nov 16, 2023
@sahkal sahkal added this to the November 2023 Release milestone Nov 16, 2023
@likhinbopanna likhinbopanna added this pull request to the merge queue Nov 16, 2023
Merged via the queue into main with commit d4d2c2c Nov 16, 2023
12 of 14 checks passed
@likhinbopanna likhinbopanna deleted the payment_link_fix branch November 16, 2023 10:13
@SanchithHegde SanchithHegde removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Nov 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants