@doujins/payments-ui 0.0.2 → 0.0.4
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/dist/index.cjs +25 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +25 -7
- package/dist/index.js.map +1 -1
- package/package.json +18 -17
package/dist/index.js
CHANGED
|
@@ -35,7 +35,7 @@ var loadCollectJs = (tokenizationKey) => {
|
|
|
35
35
|
if (existing) return;
|
|
36
36
|
const script = document.createElement("script");
|
|
37
37
|
script.src = SCRIPT_SRC;
|
|
38
|
-
script.setAttribute("data-tokenization-key",
|
|
38
|
+
script.setAttribute("data-tokenization-key", "8u8B78-23Z347-c2svF3-pbEb7G");
|
|
39
39
|
script.setAttribute("data-field-ccnumber-placeholder", "0000 0000 0000 0000");
|
|
40
40
|
script.setAttribute("data-field-ccexp-placeholder", "10 / 25");
|
|
41
41
|
script.setAttribute("data-field-cvv-placeholder", "123");
|
|
@@ -421,12 +421,30 @@ var createPaymentStore = (options) => createStore((set, get) => {
|
|
|
421
421
|
};
|
|
422
422
|
return {
|
|
423
423
|
...initialState,
|
|
424
|
-
setSelectedMethod: (methodId) =>
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
424
|
+
setSelectedMethod: (methodId) => {
|
|
425
|
+
if (get().selectedMethodId === methodId) return;
|
|
426
|
+
set({ selectedMethodId: methodId });
|
|
427
|
+
},
|
|
428
|
+
setSolanaModalOpen: (open) => {
|
|
429
|
+
if (get().solanaModalOpen === open) return;
|
|
430
|
+
set({ solanaModalOpen: open });
|
|
431
|
+
},
|
|
432
|
+
setSolanaTab: (tab) => {
|
|
433
|
+
if (get().solanaTab === tab) return;
|
|
434
|
+
set({ solanaTab: tab });
|
|
435
|
+
},
|
|
436
|
+
setSolanaSelectedToken: (symbol) => {
|
|
437
|
+
if (get().solanaSelectedToken === symbol) return;
|
|
438
|
+
set({ solanaSelectedToken: symbol });
|
|
439
|
+
},
|
|
440
|
+
setSolanaTokenAmount: (amount) => {
|
|
441
|
+
if (get().solanaTokenAmount === amount) return;
|
|
442
|
+
set({ solanaTokenAmount: amount });
|
|
443
|
+
},
|
|
444
|
+
setSolanaTransactionId: (txId) => {
|
|
445
|
+
if (get().solanaTransactionId === txId) return;
|
|
446
|
+
set({ solanaTransactionId: txId });
|
|
447
|
+
},
|
|
430
448
|
startSavedPayment: () => {
|
|
431
449
|
notifyStatus("processing", { source: "saved-payment" });
|
|
432
450
|
set({ savedPaymentStatus: "processing", savedPaymentError: null });
|