Commit eaa8496
feat(checkout): add CCAvenue payment provider and cookie-session retu… (#1291)
* feat(checkout): add CCAvenue payment provider and cookie-session return flow
- Add CCAvenue checkout button, icon, and return provider
- Wrap with CCAvenueReturnProvider only when ccavenueConfig.accessCodeId is set
- Use session from context (cookie) on CCAvenue return; remove sessionStorage token flow
- Register CCAvenue in lazy-payment-loader, payment-form, types, and GraphQL
- Update conditional-providers and use-confirm-checkout for CCAvenue
- Add ccavenue localizations across locales
- Update nextjs example and store actions
Co-authored-by: Cursor <cursoragent@cursor.com>
* feat(checkout): CCAvenue improvements and example config
- Pass ccavenueConfig from env in Next.js example (accessCodeId, redirectURL)
- CCAvenue button: user-friendly message for AUTHORIZATION_FAILED, remove debug logs
- CCAvenue return: use useConfirmCheckout.mutateAsync for redirect and error handling
- Remove Record typecasting for payment.methods.ccavenue and descriptions in payment-form
Co-authored-by: Cursor <cursoragent@cursor.com>
* feat(react): set CCAvenue redirect URL in payment component by environment
- Make CCAvenueConfig.redirectURL optional; derive gateway URL from apiHost
(prod: secure.ccavenue.com, test: test.ccavenue.com) like Square CDN
- Consumer only passes accessCodeId; example checkout no longer needs
NEXT_PUBLIC_CCAVENUE_REDIRECT_URL
Co-authored-by: Cursor <cursoragent@cursor.com>
* chore(react): CCAvenue cleanup - remove redirectURL from config, debug log, and label fallback
- Remove optional redirectURL from CCAvenueConfig (always use derived gateway URL)
- Remove console.log from CCAvenue checkout button
- Use translation only for CCAvenue payment method label in payment form
Co-authored-by: Cursor <cursoragent@cursor.com>
* disable form and mutations if confirmingCheckout
* feat(ccavenue): add shipping validation and jwt auth support
- CCAvenueCheckoutButton: require shipping methods when delivery is SHIP before
allowing payment; use env-based redirect URL
- CCAvenueReturnProvider: support jwt as auth fallback when session token
unavailable for confirm checkout
- checkout-env: formatting (quotes)
Co-authored-by: Cursor <cursoragent@cursor.com>
* lint fix
* chore: add changeset for CCAvenue checkout improvements
Made-with: Cursor
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Phil Bennett <pbennett1@godaddy.com>
Co-authored-by: Phil Bennett <114938978+pbennett1-godaddy@users.noreply.github.com>1 parent dc5bcd1 commit eaa8496
File tree
39 files changed
+358
-23
lines changed- .changeset
- examples/nextjs/app
- store
- packages
- localizations/src
- react/src
- components/checkout
- form
- order
- payment
- checkout-buttons/ccavenue
- icons
- utils
- shipping
- lib/godaddy
39 files changed
+358
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
63 | 71 | | |
64 | 72 | | |
65 | 73 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
65 | 69 | | |
66 | 70 | | |
67 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
54 | 58 | | |
55 | 59 | | |
56 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
| |||
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
| 121 | + | |
120 | 122 | | |
121 | 123 | | |
122 | 124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
| |||
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
| 121 | + | |
120 | 122 | | |
121 | 123 | | |
122 | 124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
| |||
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
| 121 | + | |
120 | 122 | | |
121 | 123 | | |
122 | 124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
| |||
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
| 122 | + | |
121 | 123 | | |
122 | 124 | | |
123 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
| |||
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
| 122 | + | |
121 | 123 | | |
122 | 124 | | |
123 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
| |||
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
| 122 | + | |
121 | 123 | | |
122 | 124 | | |
123 | 125 | | |
| |||
0 commit comments