@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 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 // Required
81
- supportedCardTypes?: CardType[] // Optional: restrict card types
82
- variant?: 'default' | 'compact' // Optional: UI variant
83
- locale?: Locale // Optional: language (en, de, fr, etc.)
84
- translate?: CheckoutTranslate // Optional: custom translations
85
- styles?: StylesConfig // Optional: custom styles
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> {