@paynext/sdk 0.0.42 → 0.0.43
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 +8 -6
- package/dist/index.d.ts +2 -1
- package/dist/index.es.js +959 -945
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +17 -17
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -56,6 +56,7 @@ export const CheckoutComponent: FC<Readonly<IProps> = (props) => {
|
|
|
56
56
|
|
|
57
57
|
checkout.mount({
|
|
58
58
|
clientToken,
|
|
59
|
+
environment: 'sandbox',
|
|
59
60
|
locale: 'en',
|
|
60
61
|
onCheckoutComplete: (result: PaymentResult) => {
|
|
61
62
|
// Handle successful payment
|
|
@@ -77,12 +78,13 @@ export const CheckoutComponent: FC<Readonly<IProps> = (props) => {
|
|
|
77
78
|
|
|
78
79
|
```typescript
|
|
79
80
|
interface PayNextConfig {
|
|
80
|
-
clientToken: string
|
|
81
|
-
supportedCardTypes?: CardType[]
|
|
82
|
-
variant?: 'default' | 'compact'
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
clientToken: string
|
|
82
|
+
supportedCardTypes?: CardType[]
|
|
83
|
+
variant?: 'default' | 'compact'
|
|
84
|
+
environment?: 'sandbox' | 'production',
|
|
85
|
+
locale?: Locale
|
|
86
|
+
translate?: CheckoutTranslate
|
|
87
|
+
styles?: StylesConfig
|
|
86
88
|
onCheckoutComplete?: (result: PaymentResult) => void
|
|
87
89
|
onCheckoutFail?: (error: Error) => void
|
|
88
90
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -431,6 +431,7 @@ export declare class PayNextCheckout {
|
|
|
431
431
|
|
|
432
432
|
export declare interface PayNextConfig {
|
|
433
433
|
clientToken: string;
|
|
434
|
+
environment?: 'develop' | 'sandbox' | 'production';
|
|
434
435
|
supportedCardTypes?: CardType[];
|
|
435
436
|
variant?: 'default' | 'compact';
|
|
436
437
|
styles?: StylesConfig;
|
|
@@ -508,7 +509,7 @@ export declare interface TransactionConfigResponse extends TransactionConfig {
|
|
|
508
509
|
declare class TransactionState extends State<TransactionConfig | null> {
|
|
509
510
|
private clientToken;
|
|
510
511
|
constructor(state?: TransactionConfig);
|
|
511
|
-
updateTransaction(clientToken: string): Promise<TransactionConfig | null>;
|
|
512
|
+
updateTransaction(clientToken: string, environment?: 'develop' | 'sandbox' | 'production'): Promise<TransactionConfig | null>;
|
|
512
513
|
}
|
|
513
514
|
|
|
514
515
|
declare class TranslateState extends State<CheckoutTranslateState> {
|