@superlogic/spree-pay 0.1.2 → 0.1.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/README.md +19 -2
- package/build/index.cjs +3563 -3388
- package/build/index.css +59 -0
- package/build/index.d.cts +16 -1
- package/build/index.d.ts +16 -1
- package/build/index.js +3465 -3291
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,8 +16,10 @@ import { useState } from 'react';
|
|
|
16
16
|
import { SpreePay, SpreePayProvider, useSpreePay } from '@superlogic/spree-pay';
|
|
17
17
|
|
|
18
18
|
const spreeEnv = {
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
tenantId: 'moca' // Keep moca for crypto payments on BASE network
|
|
20
|
+
environment: 'dev',
|
|
21
|
+
accessToken: 'eyJhbGciOiJSUzI1NiIs...', // Use user JWT token
|
|
22
|
+
redirect3dsURI: '/3ds' // Any valid URI in your app that captures 3ds redirect
|
|
21
23
|
};
|
|
22
24
|
|
|
23
25
|
function Checkout() {
|
|
@@ -52,4 +54,19 @@ function CheckoutContent() {
|
|
|
52
54
|
</div>
|
|
53
55
|
);
|
|
54
56
|
}
|
|
57
|
+
|
|
58
|
+
import { useCapture3DS } from '@superlogic/spree-pay';
|
|
59
|
+
|
|
60
|
+
// example 3DS redirect page hosted on /3ds
|
|
61
|
+
export default function ThreeDSRedirectPage() {
|
|
62
|
+
// take payment intent from search params as payment_intent
|
|
63
|
+
const searchParams = exampleGetSearchParams();
|
|
64
|
+
|
|
65
|
+
// place that hook, it will take paymentIntent and close 3ds modal
|
|
66
|
+
useCapture3DS({ paymentIntent: searchParams['payment_intent'] });
|
|
67
|
+
|
|
68
|
+
// Render null or any other UI/Loader
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
|
|
55
72
|
```
|