-
Notifications
You must be signed in to change notification settings - Fork 86
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
[core] Add Stripe credit card payment support #279
Conversation
Test link - https://core-stripe-payment.d22tqykss69onq.amplifyapp.com/ |
e65900f
to
7f479e3
Compare
ab1f107
to
7f479e3
Compare
65b25f9
to
642b1af
Compare
7629b70
to
b0a1585
Compare
b4d980c
to
545602c
Compare
[LIQ-624] Prototype credit card payment in CandyShop Setup - Create CandyShopPayProvider to provide payment setup for children - Config to provide the Stripe public key for CandyShopPayProvider Add Payment folder under src/components - StripePayment.tsx to enable stripe.js if stripe pubkey is provided - StripeCardDetail.tsx to use CardElement from stripe UI - Get Order's ShopId for StripePayment
Modify the logic to avoid showing Credit Card Button while StripePubkey is not provided. - Add PaymentErrorName enum to differentiate payment error after catched - Add CreditCardPayAvailability enum to determin the disabled case while InsufficientPurchaseBalance or BelowMinPurchasePrice error occurs - Refactor the useCallback calls on APIs - Only fetch the checkPaymentAvailability when haven't fetched - Do not show the Credit Card Pay CTA on those not allowed tokens
Co-authored-by: tvminh <[email protected]>
PaymentService will not expose the stripePaymentId to client but the entityId to let client continue calling the confirm with that info to Server. Fix the BuyModalState when error or failed case occurs from processing CandyShopPay.confirmPayment. - We should also handle other errors, not only purchase or transfer to abort the processing state and show the error modal.
affff4c
to
6cc9f84
Compare
6cc9f84
to
e3948d0
Compare
e3948d0
to
2c3f800
Compare
export interface PaymentErrorDetails { | ||
title: string; | ||
content: string; | ||
moreInfo?: PaymentErrorMoreInfo; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: can name it PaymentErrorExtra
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the relevant object matches to current payment-service
@@ -12,3 +12,5 @@ export * from './public/Modal'; | |||
|
|||
export { TransactionState, OrderDefaultFilter } from './model'; | |||
export { CandyContext, CandyShopDataValidator } from './public/Context/CandyShopDataValidator'; | |||
/* Don't export every usages from contexts */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/* Don't export every usage from context */
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The folder is named contexts
under ui/src/
so I wrote contexts here.
No description provided.