@blocklet/payment-react 1.19.23 → 1.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.aigne/doc-smith/config.yaml +114 -0
- package/.aigne/doc-smith/output/structure-plan.json +361 -0
- package/.aigne/doc-smith/preferences.yml +55 -0
- package/.aigne/doc-smith/upload-cache.yaml +264 -0
- package/README.md +2 -3
- package/docs/_sidebar.md +33 -0
- package/docs/components-business-auto-topup.md +238 -0
- package/docs/components-business-overdue-invoice-payment.md +231 -0
- package/docs/components-business-resume-subscription.md +177 -0
- package/docs/components-business.md +45 -0
- package/docs/components-checkout-checkout-donate.md +199 -0
- package/docs/components-checkout-checkout-form.md +185 -0
- package/docs/components-checkout-checkout-table.md +228 -0
- package/docs/components-checkout.md +131 -0
- package/docs/components-history-credit-grants-list.md +98 -0
- package/docs/components-history-credit-transactions-list.md +116 -0
- package/docs/components-history-invoice-list.md +104 -0
- package/docs/components-history-payment-list.md +65 -0
- package/docs/components-history.md +92 -0
- package/docs/components-ui-form-elements-address-form.md +150 -0
- package/docs/components-ui-form-elements-country-select.md +105 -0
- package/docs/components-ui-form-elements-currency-selector.md +124 -0
- package/docs/components-ui-form-elements-phone-input.md +160 -0
- package/docs/components-ui-form-elements.md +125 -0
- package/docs/components-ui-payment-summary.md +157 -0
- package/docs/components-ui-pricing-table.md +227 -0
- package/docs/components-ui.md +44 -0
- package/docs/components.md +95 -0
- package/docs/getting-started.md +111 -0
- package/docs/guides-theming.md +175 -0
- package/docs/guides-utilities.md +235 -0
- package/docs/guides.md +95 -0
- package/docs/hooks-use-mobile.md +70 -0
- package/docs/hooks-use-subscription.md +129 -0
- package/docs/hooks.md +84 -0
- package/docs/overview.md +87 -0
- package/docs/providers-donate-provider.md +175 -0
- package/docs/providers-payment-provider.md +245 -0
- package/docs/providers.md +101 -0
- package/es/libs/util.d.ts +1 -1
- package/es/payment/form/index.js +15 -1
- package/es/payment/summary.js +1 -1
- package/lib/libs/util.d.ts +1 -1
- package/lib/payment/form/index.js +14 -1
- package/lib/payment/summary.js +1 -1
- package/package.json +9 -9
- package/src/libs/util.ts +1 -0
- package/src/payment/form/index.tsx +16 -1
- package/src/payment/summary.tsx +1 -2
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
3604c8d3f5f58223efe43d2a34fb378cc2eb0436d05debfd051570e456b1a670:
|
|
2
|
+
local_path: .aigne/doc-smith/.tmp/assets/d2/5fe807d9d96faf73f476310ae5e1d3cf098268ba0bd2e2b0bcdc8036266e751c.svg
|
|
3
|
+
sites:
|
|
4
|
+
https://www.staging.arcblock.io:
|
|
5
|
+
url: https://www.staging.arcblock.io/image-bin/uploads/3604c8d3f5f58223.svg
|
|
6
|
+
upload_time: 2025-09-01T01:20:41.410Z
|
|
7
|
+
697853802d6ce76ff2bb40fb3a2c258f6aa0bd69f89c56c6b4350f50c3625286:
|
|
8
|
+
local_path: .aigne/doc-smith/.tmp/assets/d2/1eda03215c727abd2e9e10d1d64eef0156abae81107381a20b6550a717db8d76.svg
|
|
9
|
+
sites:
|
|
10
|
+
https://www.staging.arcblock.io:
|
|
11
|
+
url: https://www.staging.arcblock.io/image-bin/uploads/697853802d6ce76f.svg
|
|
12
|
+
upload_time: 2025-09-01T01:20:41.783Z
|
|
13
|
+
https://www.arcblock.io:
|
|
14
|
+
url: https://www.arcblock.io/image-bin/uploads/697853802d6ce76f.svg
|
|
15
|
+
upload_time: 2025-09-01T02:59:10.382Z
|
|
16
|
+
https://docsmith.aigne.io:
|
|
17
|
+
url: https://docsmith.aigne.io/image-bin/uploads/697853802d6ce76f.svg
|
|
18
|
+
upload_time: 2025-09-01T03:00:01.145Z
|
|
19
|
+
a2270a3afd71ddf8f42953b8df37a59b32d8f02a74cb0cc4c4be7744f13d7bd5:
|
|
20
|
+
local_path: .aigne/doc-smith/.tmp/assets/d2/b5d880d87cdc861d59f004d58192290d2ef5eab0d4bcdd50a1282c8d303cce88.svg
|
|
21
|
+
sites:
|
|
22
|
+
https://www.staging.arcblock.io:
|
|
23
|
+
url: https://www.staging.arcblock.io/image-bin/uploads/a2270a3afd71ddf8.svg
|
|
24
|
+
upload_time: 2025-09-01T01:20:42.013Z
|
|
25
|
+
https://www.arcblock.io:
|
|
26
|
+
url: https://www.arcblock.io/image-bin/uploads/a2270a3afd71ddf8.svg
|
|
27
|
+
upload_time: 2025-09-01T02:59:11.034Z
|
|
28
|
+
https://docsmith.aigne.io:
|
|
29
|
+
url: https://docsmith.aigne.io/image-bin/uploads/a2270a3afd71ddf8.svg
|
|
30
|
+
upload_time: 2025-09-01T03:00:01.416Z
|
|
31
|
+
556f860ff5b5be30df91ec6a434986f5d74fbe5dbdb8dae06e3b331b658421d9:
|
|
32
|
+
local_path: .aigne/doc-smith/.tmp/assets/d2/ddd002a9ac29fb015a3daaefc68641778d488f971f88b898694ade291b7d5ecb.svg
|
|
33
|
+
sites:
|
|
34
|
+
https://www.staging.arcblock.io:
|
|
35
|
+
url: https://www.staging.arcblock.io/image-bin/uploads/556f860ff5b5be30.svg
|
|
36
|
+
upload_time: 2025-09-01T01:20:42.356Z
|
|
37
|
+
https://www.arcblock.io:
|
|
38
|
+
url: https://www.arcblock.io/image-bin/uploads/556f860ff5b5be30.svg
|
|
39
|
+
upload_time: 2025-09-01T02:59:10.735Z
|
|
40
|
+
https://docsmith.aigne.io:
|
|
41
|
+
url: https://docsmith.aigne.io/image-bin/uploads/556f860ff5b5be30.svg
|
|
42
|
+
upload_time: 2025-09-01T03:00:01.412Z
|
|
43
|
+
c3ef1f0292ec84211e21dfba4176df0c8171b3db423ad8a3f16fcd03eb7a4ab9:
|
|
44
|
+
local_path: .aigne/doc-smith/.tmp/assets/d2/19ca576bc655afb674be0c5d8630160ca795f3f7c89868e3cff5c03c6c11b12d.svg
|
|
45
|
+
sites:
|
|
46
|
+
https://www.staging.arcblock.io:
|
|
47
|
+
url: https://www.staging.arcblock.io/image-bin/uploads/c3ef1f0292ec8421.svg
|
|
48
|
+
upload_time: 2025-09-01T01:20:42.576Z
|
|
49
|
+
https://www.arcblock.io:
|
|
50
|
+
url: https://www.arcblock.io/image-bin/uploads/c3ef1f0292ec8421.svg
|
|
51
|
+
upload_time: 2025-09-01T02:59:10.408Z
|
|
52
|
+
https://docsmith.aigne.io:
|
|
53
|
+
url: https://docsmith.aigne.io/image-bin/uploads/c3ef1f0292ec8421.svg
|
|
54
|
+
upload_time: 2025-09-01T03:00:01.331Z
|
|
55
|
+
a088be9a1b6bc1d1070170734ef16ae8d550f6edb08e25a328b68e12671d7db6:
|
|
56
|
+
local_path: .aigne/doc-smith/.tmp/assets/d2/0fd4aa7a9f0aa2e77c92fdcf89d5df4cf6834529ab328bc0a39197e97043b1cc.svg
|
|
57
|
+
sites:
|
|
58
|
+
https://www.staging.arcblock.io:
|
|
59
|
+
url: https://www.staging.arcblock.io/image-bin/uploads/a088be9a1b6bc1d1.svg
|
|
60
|
+
upload_time: 2025-09-01T01:20:42.713Z
|
|
61
|
+
https://www.arcblock.io:
|
|
62
|
+
url: https://www.arcblock.io/image-bin/uploads/a088be9a1b6bc1d1.svg
|
|
63
|
+
upload_time: 2025-09-01T02:59:10.065Z
|
|
64
|
+
https://docsmith.aigne.io:
|
|
65
|
+
url: https://docsmith.aigne.io/image-bin/uploads/a088be9a1b6bc1d1.svg
|
|
66
|
+
upload_time: 2025-09-01T03:00:01.938Z
|
|
67
|
+
1f04ad26dc984f0354612b99e3d47b0be7cacca8a57cce867eef848027967cf9:
|
|
68
|
+
local_path: .aigne/doc-smith/.tmp/assets/d2/1f6e523e3a9748df3a00eb479891ae5e8b852cc177095c7cd92c9c9bc64d924d.svg
|
|
69
|
+
sites:
|
|
70
|
+
https://www.staging.arcblock.io:
|
|
71
|
+
url: https://www.staging.arcblock.io/image-bin/uploads/1f04ad26dc984f03.svg
|
|
72
|
+
upload_time: 2025-09-01T01:20:43.907Z
|
|
73
|
+
https://www.arcblock.io:
|
|
74
|
+
url: https://www.arcblock.io/image-bin/uploads/1f04ad26dc984f03.svg
|
|
75
|
+
upload_time: 2025-09-01T02:59:11.873Z
|
|
76
|
+
https://docsmith.aigne.io:
|
|
77
|
+
url: https://docsmith.aigne.io/image-bin/uploads/1f04ad26dc984f03.svg
|
|
78
|
+
upload_time: 2025-09-01T03:00:02.175Z
|
|
79
|
+
ae6a2dea6777131338f7d1fbc9d5f292efd85daa7f941a85ce518d4a05e9defe:
|
|
80
|
+
local_path: .aigne/doc-smith/.tmp/assets/d2/81fd2b8a70126e7993c819551ac7ecaf9ed1c06e393bbe5a54783e90c92eebb1.svg
|
|
81
|
+
sites:
|
|
82
|
+
https://www.staging.arcblock.io:
|
|
83
|
+
url: https://www.staging.arcblock.io/image-bin/uploads/ae6a2dea67771313.svg
|
|
84
|
+
upload_time: 2025-09-01T01:20:43.929Z
|
|
85
|
+
https://www.arcblock.io:
|
|
86
|
+
url: https://www.arcblock.io/image-bin/uploads/ae6a2dea67771313.svg
|
|
87
|
+
upload_time: 2025-09-01T02:59:11.974Z
|
|
88
|
+
https://docsmith.aigne.io:
|
|
89
|
+
url: https://docsmith.aigne.io/image-bin/uploads/ae6a2dea67771313.svg
|
|
90
|
+
upload_time: 2025-09-01T03:00:02.490Z
|
|
91
|
+
7c217cbee2846d1168c732adaa4c7a33bce606b36892c5ed753a8e6968fe27ad:
|
|
92
|
+
local_path: .aigne/doc-smith/.tmp/assets/d2/a12bf9e27a9dd598142b0a58bd5c12ebfeff8b8ae6b8c5aee8b1b76acc3baf60.svg
|
|
93
|
+
sites:
|
|
94
|
+
https://www.staging.arcblock.io:
|
|
95
|
+
url: https://www.staging.arcblock.io/image-bin/uploads/7c217cbee2846d11.svg
|
|
96
|
+
upload_time: 2025-09-01T01:20:45.090Z
|
|
97
|
+
f3e72c1c26b1d3cd2ea455441ad9024294628f3d10563298e8c371ac03358469:
|
|
98
|
+
local_path: .aigne/doc-smith/.tmp/assets/d2/6643b09d23235c4daed1d687fab3c262eaa9f9863374f06e7302abdc35de2fbe.svg
|
|
99
|
+
sites:
|
|
100
|
+
https://www.staging.arcblock.io:
|
|
101
|
+
url: https://www.staging.arcblock.io/image-bin/uploads/f3e72c1c26b1d3cd.svg
|
|
102
|
+
upload_time: 2025-09-01T01:20:45.469Z
|
|
103
|
+
https://www.arcblock.io:
|
|
104
|
+
url: https://www.arcblock.io/image-bin/uploads/f3e72c1c26b1d3cd.svg
|
|
105
|
+
upload_time: 2025-09-01T02:59:12.315Z
|
|
106
|
+
https://docsmith.aigne.io:
|
|
107
|
+
url: https://docsmith.aigne.io/image-bin/uploads/f3e72c1c26b1d3cd.svg
|
|
108
|
+
upload_time: 2025-09-01T03:00:03.297Z
|
|
109
|
+
bd79e275572e0f89e189017cd4ec8153eb0ae4c91f39e0965d1266009db7cb77:
|
|
110
|
+
local_path: .aigne/doc-smith/.tmp/assets/d2/221829776d3cae36af1d173ac2a821bcdd1d9c936f87dc439acea8f02f788557.svg
|
|
111
|
+
sites:
|
|
112
|
+
https://www.staging.arcblock.io:
|
|
113
|
+
url: https://www.staging.arcblock.io/image-bin/uploads/bd79e275572e0f89.svg
|
|
114
|
+
upload_time: 2025-09-01T01:20:45.561Z
|
|
115
|
+
f9d15f76ca09fde5a243e6cbc55bbfe0706d58f69691a157aa3e6ec229033830:
|
|
116
|
+
local_path: .aigne/doc-smith/.tmp/assets/d2/ee961e8be6e0483ad9b51c2b527462e5be97419e551af0f76fd90406705ee037.svg
|
|
117
|
+
sites:
|
|
118
|
+
https://www.staging.arcblock.io:
|
|
119
|
+
url: https://www.staging.arcblock.io/image-bin/uploads/f9d15f76ca09fde5.svg
|
|
120
|
+
upload_time: 2025-09-01T01:20:45.563Z
|
|
121
|
+
https://www.arcblock.io:
|
|
122
|
+
url: https://www.arcblock.io/image-bin/uploads/f9d15f76ca09fde5.svg
|
|
123
|
+
upload_time: 2025-09-01T02:59:12.212Z
|
|
124
|
+
https://docsmith.aigne.io:
|
|
125
|
+
url: https://docsmith.aigne.io/image-bin/uploads/f9d15f76ca09fde5.svg
|
|
126
|
+
upload_time: 2025-09-01T03:00:03.408Z
|
|
127
|
+
3ca7e84a46eab4899e52acb58a5405c8bc60721b4a56eec78bc46096715c3bc9:
|
|
128
|
+
local_path: .aigne/doc-smith/.tmp/assets/d2/ce8ca4168e7d8fb16c0d40a59060be8c23c7fdd4d7e160ea53f26126a0f64f42.svg
|
|
129
|
+
sites:
|
|
130
|
+
https://www.staging.arcblock.io:
|
|
131
|
+
url: https://www.staging.arcblock.io/image-bin/uploads/3ca7e84a46eab489.svg
|
|
132
|
+
upload_time: 2025-09-01T01:20:45.622Z
|
|
133
|
+
https://www.arcblock.io:
|
|
134
|
+
url: https://www.arcblock.io/image-bin/uploads/3ca7e84a46eab489.svg
|
|
135
|
+
upload_time: 2025-09-01T02:59:14.123Z
|
|
136
|
+
https://docsmith.aigne.io:
|
|
137
|
+
url: https://docsmith.aigne.io/image-bin/uploads/3ca7e84a46eab489.svg
|
|
138
|
+
upload_time: 2025-09-01T03:00:05.117Z
|
|
139
|
+
0bf39fa98fa2fdd025fb30e5c199b95efce6c455f1bc9a5fe502741b602eaf94:
|
|
140
|
+
local_path: .aigne/doc-smith/.tmp/assets/d2/f19f8a00e81ad90f71ea578a171bae85504149953d5396eaff38a2ea9c94457c.svg
|
|
141
|
+
sites:
|
|
142
|
+
https://www.staging.arcblock.io:
|
|
143
|
+
url: https://www.staging.arcblock.io/image-bin/uploads/0bf39fa98fa2fdd0.svg
|
|
144
|
+
upload_time: 2025-09-01T01:20:45.794Z
|
|
145
|
+
https://www.arcblock.io:
|
|
146
|
+
url: https://www.arcblock.io/image-bin/uploads/0bf39fa98fa2fdd0.svg
|
|
147
|
+
upload_time: 2025-09-01T02:59:14.081Z
|
|
148
|
+
https://docsmith.aigne.io:
|
|
149
|
+
url: https://docsmith.aigne.io/image-bin/uploads/0bf39fa98fa2fdd0.svg
|
|
150
|
+
upload_time: 2025-09-01T03:00:04.965Z
|
|
151
|
+
6fb6f72dd56a4ee9029cfa25b17f5580229927b03a58e8daf54a903f03ccbd91:
|
|
152
|
+
local_path: .aigne/doc-smith/.tmp/assets/d2/de06e3a30e1fe5561bc236ea4d1967d80563f0ce041434415937a1a4016ba28e.svg
|
|
153
|
+
sites:
|
|
154
|
+
https://www.staging.arcblock.io:
|
|
155
|
+
url: https://www.staging.arcblock.io/image-bin/uploads/6fb6f72dd56a4ee9.svg
|
|
156
|
+
upload_time: 2025-09-01T01:20:47.317Z
|
|
157
|
+
https://www.arcblock.io:
|
|
158
|
+
url: https://www.arcblock.io/image-bin/uploads/6fb6f72dd56a4ee9.svg
|
|
159
|
+
upload_time: 2025-09-01T02:59:13.748Z
|
|
160
|
+
https://docsmith.aigne.io:
|
|
161
|
+
url: https://docsmith.aigne.io/image-bin/uploads/6fb6f72dd56a4ee9.svg
|
|
162
|
+
upload_time: 2025-09-01T03:00:04.792Z
|
|
163
|
+
801c818280688ede4905c63a8c796e0b94bbb7bf55acb517567349b1b75b33bc:
|
|
164
|
+
local_path: .aigne/doc-smith/.tmp/assets/d2/8acdff948bb0ccb8e961ce8c9a305d965d57eaed6126bcce474c9898ae0dbc8a.svg
|
|
165
|
+
sites:
|
|
166
|
+
https://www.staging.arcblock.io:
|
|
167
|
+
url: https://www.staging.arcblock.io/image-bin/uploads/801c818280688ede.svg
|
|
168
|
+
upload_time: 2025-09-01T01:20:47.611Z
|
|
169
|
+
https://www.arcblock.io:
|
|
170
|
+
url: https://www.arcblock.io/image-bin/uploads/801c818280688ede.svg
|
|
171
|
+
upload_time: 2025-09-01T02:59:14.056Z
|
|
172
|
+
https://docsmith.aigne.io:
|
|
173
|
+
url: https://docsmith.aigne.io/image-bin/uploads/801c818280688ede.svg
|
|
174
|
+
upload_time: 2025-09-01T03:00:04.671Z
|
|
175
|
+
0a600e2d01664969a142e8ea059a5cc153056df0fe9a25ca097ec550fbe3b2e6:
|
|
176
|
+
local_path: .aigne/doc-smith/.tmp/assets/d2/65746880731bc6205eb09bab22b80b875ff511d543e9aa2d440e5751ad30873c.svg
|
|
177
|
+
sites:
|
|
178
|
+
https://www.staging.arcblock.io:
|
|
179
|
+
url: https://www.staging.arcblock.io/image-bin/uploads/0a600e2d01664969.svg
|
|
180
|
+
upload_time: 2025-09-01T01:20:48.459Z
|
|
181
|
+
https://www.arcblock.io:
|
|
182
|
+
url: https://www.arcblock.io/image-bin/uploads/0a600e2d01664969.svg
|
|
183
|
+
upload_time: 2025-09-01T02:59:14.449Z
|
|
184
|
+
https://docsmith.aigne.io:
|
|
185
|
+
url: https://docsmith.aigne.io/image-bin/uploads/0a600e2d01664969.svg
|
|
186
|
+
upload_time: 2025-09-01T03:00:05.297Z
|
|
187
|
+
92adafaf95ce855ad9b128cd0d38eaf0239bd3e1683a251eaee3d4950f1c0da1:
|
|
188
|
+
local_path: .aigne/doc-smith/.tmp/assets/d2/3d58bc0d41786f0fdd7b468e43844978e4416faed2ad8d51a305eb595c530ad6.svg
|
|
189
|
+
sites:
|
|
190
|
+
https://www.staging.arcblock.io:
|
|
191
|
+
url: https://www.staging.arcblock.io/image-bin/uploads/92adafaf95ce855a.svg
|
|
192
|
+
upload_time: 2025-09-01T01:20:48.509Z
|
|
193
|
+
https://www.arcblock.io:
|
|
194
|
+
url: https://www.arcblock.io/image-bin/uploads/92adafaf95ce855a.svg
|
|
195
|
+
upload_time: 2025-09-01T02:59:14.396Z
|
|
196
|
+
https://docsmith.aigne.io:
|
|
197
|
+
url: https://docsmith.aigne.io/image-bin/uploads/92adafaf95ce855a.svg
|
|
198
|
+
upload_time: 2025-09-01T03:00:04.651Z
|
|
199
|
+
5882d52159e1608b174f98d936bed1eb02f38d70f4caf4185810857f2bbce350:
|
|
200
|
+
local_path: .aigne/doc-smith/.tmp/assets/d2/e3ee19272376514272efc8f91d24f56f4c50e23f15273171139bf0f6c9e13f0c.svg
|
|
201
|
+
sites:
|
|
202
|
+
https://www.staging.arcblock.io:
|
|
203
|
+
url: https://www.staging.arcblock.io/image-bin/uploads/5882d52159e1608b.svg
|
|
204
|
+
upload_time: 2025-09-01T01:38:54.298Z
|
|
205
|
+
https://www.arcblock.io:
|
|
206
|
+
url: https://www.arcblock.io/image-bin/uploads/5882d52159e1608b.svg
|
|
207
|
+
upload_time: 2025-09-01T02:59:10.086Z
|
|
208
|
+
https://docsmith.aigne.io:
|
|
209
|
+
url: https://docsmith.aigne.io/image-bin/uploads/5882d52159e1608b.svg
|
|
210
|
+
upload_time: 2025-09-01T03:00:02.059Z
|
|
211
|
+
5f7b8c0d4e78265874d1198652e4815bf2103125ae69947bc3222546ebe7e05d:
|
|
212
|
+
local_path: .aigne/doc-smith/.tmp/assets/d2/517a5bdd6d5200496c8b2de3bc65731e3f44fd7339f45ccbfcb6b791fb77179c.svg
|
|
213
|
+
sites:
|
|
214
|
+
https://www.staging.arcblock.io:
|
|
215
|
+
url: https://www.staging.arcblock.io/image-bin/uploads/5f7b8c0d4e782658.svg
|
|
216
|
+
upload_time: 2025-09-01T01:38:54.572Z
|
|
217
|
+
https://www.arcblock.io:
|
|
218
|
+
url: https://www.arcblock.io/image-bin/uploads/5f7b8c0d4e782658.svg
|
|
219
|
+
upload_time: 2025-09-01T02:59:09.948Z
|
|
220
|
+
https://docsmith.aigne.io:
|
|
221
|
+
url: https://docsmith.aigne.io/image-bin/uploads/5f7b8c0d4e782658.svg
|
|
222
|
+
upload_time: 2025-09-01T03:00:00.718Z
|
|
223
|
+
abfe04f6bb29267b31a6e8356b4b5dd065811e10dbdb721c2523d89863c0b68c:
|
|
224
|
+
local_path: .aigne/doc-smith/.tmp/assets/d2/0bbd1cab0bd07a50f38adda2416696073473f477a06756f08884ba99aac25b00.svg
|
|
225
|
+
sites:
|
|
226
|
+
https://www.staging.arcblock.io:
|
|
227
|
+
url: https://www.staging.arcblock.io/image-bin/uploads/abfe04f6bb29267b.svg
|
|
228
|
+
upload_time: 2025-09-01T01:38:55.532Z
|
|
229
|
+
3fc53211e7b7f9632d9097bfec7bc264affed5c4c158c25170c020e959123a93:
|
|
230
|
+
local_path: .aigne/doc-smith/.tmp/assets/d2/4013453d7bae501ab81869c01b4d4685906494cf3f30a47549ce92074233f1ee.svg
|
|
231
|
+
sites:
|
|
232
|
+
https://www.staging.arcblock.io:
|
|
233
|
+
url: https://www.staging.arcblock.io/image-bin/uploads/3fc53211e7b7f963.svg
|
|
234
|
+
upload_time: 2025-09-01T02:41:51.286Z
|
|
235
|
+
https://www.arcblock.io:
|
|
236
|
+
url: https://www.arcblock.io/image-bin/uploads/3fc53211e7b7f963.svg
|
|
237
|
+
upload_time: 2025-09-01T02:59:12.216Z
|
|
238
|
+
https://docsmith.aigne.io:
|
|
239
|
+
url: https://docsmith.aigne.io/image-bin/uploads/3fc53211e7b7f963.svg
|
|
240
|
+
upload_time: 2025-09-01T03:00:03.514Z
|
|
241
|
+
51bb582e2498b6ac1c5458ddf461746f821bc9c5ded27c754822d5b6be928c04:
|
|
242
|
+
local_path: .aigne/doc-smith/.tmp/assets/d2/8aa239cb8ca9a7779960168a0291412f1b22654bef4dac94579a0e2a3608c283.svg
|
|
243
|
+
sites:
|
|
244
|
+
https://www.staging.arcblock.io:
|
|
245
|
+
url: https://www.staging.arcblock.io/image-bin/uploads/51bb582e2498b6ac.svg
|
|
246
|
+
upload_time: 2025-09-01T02:41:51.898Z
|
|
247
|
+
https://www.arcblock.io:
|
|
248
|
+
url: https://www.arcblock.io/image-bin/uploads/51bb582e2498b6ac.svg
|
|
249
|
+
upload_time: 2025-09-01T02:59:12.221Z
|
|
250
|
+
https://docsmith.aigne.io:
|
|
251
|
+
url: https://docsmith.aigne.io/image-bin/uploads/51bb582e2498b6ac.svg
|
|
252
|
+
upload_time: 2025-09-01T03:00:03.340Z
|
|
253
|
+
59e576cb3a179b39b4b1869f4111df71971b93557728bbb6df637fec7e64052c:
|
|
254
|
+
local_path: .aigne/doc-smith/.tmp/assets/d2/1fca9146292a7864247350894a6f2fa24286591c02f75096888d82fb347f3f90.svg
|
|
255
|
+
sites:
|
|
256
|
+
https://www.staging.arcblock.io:
|
|
257
|
+
url: https://www.staging.arcblock.io/image-bin/uploads/59e576cb3a179b39.svg
|
|
258
|
+
upload_time: 2025-09-01T02:41:53.334Z
|
|
259
|
+
https://www.arcblock.io:
|
|
260
|
+
url: https://www.arcblock.io/image-bin/uploads/59e576cb3a179b39.svg
|
|
261
|
+
upload_time: 2025-09-01T02:59:14.125Z
|
|
262
|
+
https://docsmith.aigne.io:
|
|
263
|
+
url: https://docsmith.aigne.io/image-bin/uploads/59e576cb3a179b39.svg
|
|
264
|
+
upload_time: 2025-09-01T03:00:04.866Z
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@blocklet/payment-react)
|
|
4
4
|
|
|
5
|
-
A React component library for building payment flows, subscriptions, and donation systems in
|
|
5
|
+
A React component library for building payment flows, subscriptions, and donation systems in blocklets, seamlessly integrated with Payment Kit.
|
|
6
6
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
@@ -14,8 +14,7 @@ A React component library for building payment flows, subscriptions, and donatio
|
|
|
14
14
|
|
|
15
15
|
## Related Links
|
|
16
16
|
|
|
17
|
-
- [Payment Kit Documentation](https://www.arcblock.io/docs/arcblock-payment-kit
|
|
18
|
-
- [Example Implementation](https://github.com/blocklet/payment-kit/blob/master/blocklets/example/src/pages/checkout.jsx) - Complete example showing how to integrate the payment components
|
|
17
|
+
- [Payment Kit Documentation](https://www.arcblock.io/docs/arcblock-payment-kit) - Official documentation with detailed guides and API references
|
|
19
18
|
|
|
20
19
|
## Installation
|
|
21
20
|
|
package/docs/_sidebar.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
* [Overview](/overview.md)
|
|
2
|
+
* [Getting Started](/getting-started.md)
|
|
3
|
+
* [Providers](/providers.md)
|
|
4
|
+
* [PaymentProvider](/providers-payment-provider.md)
|
|
5
|
+
* [DonateProvider](/providers-donate-provider.md)
|
|
6
|
+
* [Components](/components.md)
|
|
7
|
+
* [Checkout Components](/components-checkout.md)
|
|
8
|
+
* [CheckoutForm](/components-checkout-checkout-form.md)
|
|
9
|
+
* [CheckoutTable](/components-checkout-checkout-table.md)
|
|
10
|
+
* [CheckoutDonate](/components-checkout-checkout-donate.md)
|
|
11
|
+
* [UI Components](/components-ui.md)
|
|
12
|
+
* [PricingTable](/components-ui-pricing-table.md)
|
|
13
|
+
* [PaymentSummary](/components-ui-payment-summary.md)
|
|
14
|
+
* [Form Elements](/components-ui-form-elements.md)
|
|
15
|
+
* [AddressForm](/components-ui-form-elements-address-form.md)
|
|
16
|
+
* [PhoneInput](/components-ui-form-elements-phone-input.md)
|
|
17
|
+
* [CountrySelect](/components-ui-form-elements-country-select.md)
|
|
18
|
+
* [CurrencySelector](/components-ui-form-elements-currency-selector.md)
|
|
19
|
+
* [Business Logic Components](/components-business.md)
|
|
20
|
+
* [OverdueInvoicePayment](/components-business-overdue-invoice-payment.md)
|
|
21
|
+
* [ResumeSubscription](/components-business-resume-subscription.md)
|
|
22
|
+
* [Auto-Topup Components](/components-business-auto-topup.md)
|
|
23
|
+
* [History Components](/components-history.md)
|
|
24
|
+
* [CustomerInvoiceList](/components-history-invoice-list.md)
|
|
25
|
+
* [CustomerPaymentList](/components-history-payment-list.md)
|
|
26
|
+
* [CreditGrantsList](/components-history-credit-grants-list.md)
|
|
27
|
+
* [CreditTransactionsList](/components-history-credit-transactions-list.md)
|
|
28
|
+
* [Guides](/guides.md)
|
|
29
|
+
* [Theming](/guides-theming.md)
|
|
30
|
+
* [Utilities](/guides-utilities.md)
|
|
31
|
+
* [Hooks](/hooks.md)
|
|
32
|
+
* [useSubscription](/hooks-use-subscription.md)
|
|
33
|
+
* [useMobile](/hooks-use-mobile.md)
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
# Auto-Topup Components
|
|
2
|
+
|
|
3
|
+
The auto-topup feature allows users to automatically recharge their credit balance when it falls below a specified threshold, ensuring uninterrupted service. This functionality is primarily managed through two components: `AutoTopup` and `AutoTopupModal`.
|
|
4
|
+
|
|
5
|
+
It is highly recommended to use the `AutoTopup` component directly. It provides a complete UI for displaying the configuration status and internally manages the `AutoTopupModal`, offering a simplified and seamless integration experience.
|
|
6
|
+
|
|
7
|
+
> **Note on Session Management:** All examples in this section use a custom hook `useSessionContext()` to retrieve `session` and `connectApi`. This is a placeholder for your application's own authentication context. For detailed instructions on setting up the required `PaymentProvider` and session context, please refer to the [PaymentProvider documentation](./providers-payment-provider.md).
|
|
8
|
+
|
|
9
|
+
## AutoTopup
|
|
10
|
+
|
|
11
|
+
The `AutoTopup` component is the primary entry point for this feature. It serves as a display card for the current auto-recharge settings and handles the presentation of the configuration modal. It supports several rendering modes to fit different UI needs.
|
|
12
|
+
|
|
13
|
+
### Usage
|
|
14
|
+
|
|
15
|
+
The component can be rendered in three different modes: `'default'`, `'simple'`, and `'custom'`.
|
|
16
|
+
|
|
17
|
+
- **default**: Renders a fully expanded card with all details visible.
|
|
18
|
+
- **simple**: Renders a collapsed card that can be expanded by the user to view details.
|
|
19
|
+
- **custom**: Provides a render prop for complete control over the UI, allowing you to build a custom display.
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
import { AutoTopup, PaymentProvider } from '@blocklet/payment-react';
|
|
23
|
+
import { useSessionContext } from '../hooks/session'; // Your custom session hook
|
|
24
|
+
|
|
25
|
+
function CreditManagementPage({ currencyId }) {
|
|
26
|
+
const { session, connectApi } = useSessionContext();
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<PaymentProvider session={session} connect={connectApi}>
|
|
30
|
+
{/* Default mode - fully expanded */}
|
|
31
|
+
<AutoTopup
|
|
32
|
+
currencyId={currencyId}
|
|
33
|
+
onConfigChange={(config) => {
|
|
34
|
+
console.log('Auto-topup config updated:', config);
|
|
35
|
+
}}
|
|
36
|
+
/>
|
|
37
|
+
|
|
38
|
+
{/* Simple mode - collapsed by default */}
|
|
39
|
+
<AutoTopup
|
|
40
|
+
currencyId={currencyId}
|
|
41
|
+
mode="simple"
|
|
42
|
+
onConfigChange={(config) => {
|
|
43
|
+
console.log('Config updated:', config);
|
|
44
|
+
}}
|
|
45
|
+
/>
|
|
46
|
+
|
|
47
|
+
{/* Custom mode - full control over rendering */}
|
|
48
|
+
<AutoTopup
|
|
49
|
+
currencyId={currencyId}
|
|
50
|
+
mode="custom"
|
|
51
|
+
>
|
|
52
|
+
{(openModal, config, paymentData, loading) => (
|
|
53
|
+
<div>
|
|
54
|
+
{loading ? (
|
|
55
|
+
<div>Loading...</div>
|
|
56
|
+
) : (
|
|
57
|
+
<div>
|
|
58
|
+
<h3>Auto Recharge Status: {config?.enabled ? 'Active' : 'Inactive'}</h3>
|
|
59
|
+
<button onClick={openModal}>Configure</button>
|
|
60
|
+
</div>
|
|
61
|
+
)}
|
|
62
|
+
</div>
|
|
63
|
+
)}
|
|
64
|
+
</AutoTopup>
|
|
65
|
+
</PaymentProvider>
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Props
|
|
71
|
+
|
|
72
|
+
| Prop | Type | Description |
|
|
73
|
+
| --- | --- | --- |
|
|
74
|
+
| `currencyId` | `string` | **Required.** The ID of the credit currency to configure auto-recharge for. |
|
|
75
|
+
| `onConfigChange` | `(config: AutoRechargeConfig) => void` | Optional. A callback function that is triggered when the auto-recharge configuration is changed. |
|
|
76
|
+
| `mode` | `'default' \| 'simple' \| 'custom'` | Optional. The rendering mode of the component. Defaults to `'default'`. |
|
|
77
|
+
| `sx` | `SxProps` | Optional. Custom styles to be applied to the component using the MUI `sx` prop. |
|
|
78
|
+
| `children` | `(openModal, config, paymentData, loading) => ReactNode` | Optional. A render prop function used only when `mode` is set to `'custom'`. It provides access to the modal trigger, configuration data, payment data, and loading state. |
|
|
79
|
+
|
|
80
|
+
## AutoTopupModal
|
|
81
|
+
|
|
82
|
+
The `AutoTopupModal` is a dialog component that allows users to enable, disable, and configure their auto-recharge settings. While it is integrated within the `AutoTopup` component, it can be used as a standalone component if you need to trigger the configuration from a custom UI element.
|
|
83
|
+
|
|
84
|
+
### Usage
|
|
85
|
+
|
|
86
|
+
You control the visibility of the modal using the `open` and `onClose` props. The `onSuccess` callback is fired when the configuration is saved successfully.
|
|
87
|
+
|
|
88
|
+
```tsx
|
|
89
|
+
import { AutoTopupModal, PaymentProvider } from '@blocklet/payment-react';
|
|
90
|
+
import { useState } from 'react';
|
|
91
|
+
import { useSessionContext } from '../hooks/session'; // Your custom session hook
|
|
92
|
+
|
|
93
|
+
function AutoRechargeSettings({ currencyId }) {
|
|
94
|
+
const { session, connectApi } = useSessionContext();
|
|
95
|
+
const [isModalOpen, setModalOpen] = useState(false);
|
|
96
|
+
|
|
97
|
+
const handleSuccess = (config) => {
|
|
98
|
+
console.log('Auto-recharge configured:', config);
|
|
99
|
+
setModalOpen(false);
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const handleError = (error) => {
|
|
103
|
+
console.error('Configuration failed:', error);
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
return (
|
|
107
|
+
<PaymentProvider session={session} connect={connectApi}>
|
|
108
|
+
<button onClick={() => setModalOpen(true)}>
|
|
109
|
+
Setup Auto-Recharge
|
|
110
|
+
</button>
|
|
111
|
+
|
|
112
|
+
<AutoTopupModal
|
|
113
|
+
open={isModalOpen}
|
|
114
|
+
onClose={() => setModalOpen(false)}
|
|
115
|
+
currencyId={currencyId}
|
|
116
|
+
onSuccess={handleSuccess}
|
|
117
|
+
onError={handleError}
|
|
118
|
+
defaultEnabled={true} // Optionally, have the toggle enabled by default
|
|
119
|
+
/>
|
|
120
|
+
</PaymentProvider>
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Props
|
|
126
|
+
|
|
127
|
+
| Prop | Type | Description |
|
|
128
|
+
| --- | --- | --- |
|
|
129
|
+
| `open` | `boolean` | **Required.** Controls whether the modal is visible. |
|
|
130
|
+
| `onClose` | `() => void` | **Required.** A callback function to close the modal. |
|
|
131
|
+
| `currencyId` | `string` | **Required.** The ID of the credit currency to configure. |
|
|
132
|
+
| `customerId` | `string` | Optional. The customer ID. Defaults to the user from the current session. |
|
|
133
|
+
| `onSuccess` | `(config: AutoRechargeConfig) => void` | Optional. A callback function executed on successful configuration. |
|
|
134
|
+
| `onError` | `(error: any) => void` | Optional. A callback function executed if an error occurs. |
|
|
135
|
+
| `defaultEnabled` | `boolean` | Optional. Sets the initial state of the 'enable' switch in the modal. Useful for quick-setup flows. |
|
|
136
|
+
|
|
137
|
+
### Configuration Flow
|
|
138
|
+
|
|
139
|
+
The following diagram illustrates the process of configuring auto-topup, including the authorization step required for payment methods.
|
|
140
|
+
|
|
141
|
+
```d2
|
|
142
|
+
shape: sequence_diagram
|
|
143
|
+
|
|
144
|
+
User: "User"
|
|
145
|
+
AutoTopupCard: "AutoTopup Component"
|
|
146
|
+
AutoTopupModal: "Configuration Modal"
|
|
147
|
+
BackendAPI: "Backend API"
|
|
148
|
+
|
|
149
|
+
User -> AutoTopupCard: "Clicks 'Configure' or 'Setup'"
|
|
150
|
+
AutoTopupCard -> AutoTopupModal: "Opens modal"
|
|
151
|
+
User -> AutoTopupModal: "Fills in threshold, amount, etc."
|
|
152
|
+
User -> AutoTopupModal: "Clicks 'Save'"
|
|
153
|
+
AutoTopupModal -> BackendAPI: "POST /api/auto-recharge-configs/submit"
|
|
154
|
+
|
|
155
|
+
auth: {
|
|
156
|
+
label: "Authorization Required"
|
|
157
|
+
BackendAPI -> AutoTopupModal: "Returns auth data (e.g., Stripe client_secret)"
|
|
158
|
+
AutoTopupModal -> User: "Renders payment form (e.g., StripeForm)"
|
|
159
|
+
User -> AutoTopupModal: "Completes payment authorization"
|
|
160
|
+
AutoTopupModal -> BackendAPI: "Confirms authorization"
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
BackendAPI -> AutoTopupModal: "Returns success response with new config"
|
|
164
|
+
AutoTopupModal -> AutoTopupCard: "Fires onSuccess callback"
|
|
165
|
+
AutoTopupModal -> User: "Closes modal"
|
|
166
|
+
AutoTopupCard -> BackendAPI: "Refreshes configuration data"
|
|
167
|
+
AutoTopupCard -> User: "Displays updated status"
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## Complete Integration Example
|
|
171
|
+
|
|
172
|
+
Here is a complete example of a credit management dashboard that integrates the `AutoTopup` component to manage multiple credit currencies. This demonstrates the recommended approach of letting `AutoTopup` handle the modal's presentation.
|
|
173
|
+
|
|
174
|
+
```tsx
|
|
175
|
+
import {
|
|
176
|
+
PaymentProvider,
|
|
177
|
+
AutoTopup,
|
|
178
|
+
CustomerInvoiceList,
|
|
179
|
+
Amount
|
|
180
|
+
} from '@blocklet/payment-react';
|
|
181
|
+
import { useState, useEffect } from 'react';
|
|
182
|
+
import { Grid, Card, CardContent, Typography } from '@mui/material';
|
|
183
|
+
import { useSessionContext } from '../hooks/session'; // Your custom session hook
|
|
184
|
+
|
|
185
|
+
function CreditDashboard() {
|
|
186
|
+
const { session, connectApi } = useSessionContext();
|
|
187
|
+
const [creditCurrencies, setCreditCurrencies] = useState([]);
|
|
188
|
+
|
|
189
|
+
useEffect(() => {
|
|
190
|
+
// In a real app, you would fetch the user's available credit currencies
|
|
191
|
+
const fetchCurrencies = async () => {
|
|
192
|
+
const currencies = await fetchCreditCurrencies(); // Your API call
|
|
193
|
+
setCreditCurrencies(currencies);
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
if (session.user) {
|
|
197
|
+
fetchCurrencies();
|
|
198
|
+
}
|
|
199
|
+
}, [session.user]);
|
|
200
|
+
|
|
201
|
+
const handleAutoTopupChange = (currencyId, config) => {
|
|
202
|
+
console.log(`Auto-topup updated for ${currencyId}:`, config);
|
|
203
|
+
// You might want to refetch currency data here
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
return (
|
|
207
|
+
<PaymentProvider session={session} connect={connectApi}>
|
|
208
|
+
<Grid container spacing={3}>
|
|
209
|
+
{creditCurrencies.map((currency) => (
|
|
210
|
+
<Grid item xs={12} md={6} key={currency.id}>
|
|
211
|
+
<Card>
|
|
212
|
+
<CardContent>
|
|
213
|
+
<Typography variant="h6">{currency.name} Balance</Typography>
|
|
214
|
+
<Typography variant="h4" color="primary">
|
|
215
|
+
<Amount
|
|
216
|
+
amount={currency.balance}
|
|
217
|
+
decimal={currency.decimal}
|
|
218
|
+
symbol={currency.symbol}
|
|
219
|
+
/>
|
|
220
|
+
</Typography>
|
|
221
|
+
|
|
222
|
+
<AutoTopup
|
|
223
|
+
currencyId={currency.id}
|
|
224
|
+
mode="simple"
|
|
225
|
+
onConfigChange={(config) => handleAutoTopupChange(currency.id, config)}
|
|
226
|
+
sx={{ mt: 2 }}
|
|
227
|
+
/>
|
|
228
|
+
</CardContent>
|
|
229
|
+
</Card>
|
|
230
|
+
</Grid>
|
|
231
|
+
))}
|
|
232
|
+
</Grid>
|
|
233
|
+
</PaymentProvider>
|
|
234
|
+
);
|
|
235
|
+
}
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
This setup provides a robust and user-friendly interface for managing credit balances and auto-recharge settings within your application.
|