@payment-kit-js/vanilla 0.3.0-alpha.1 → 0.3.0

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
@@ -6,64 +6,4 @@ Vanilla JavaScript SDK for PaymentKit. A type-safe, framework-agnostic payment p
6
6
 
7
7
  For complete documentation, guides, and examples, visit:
8
8
 
9
- **[PaymentKit.js Documentation](https://docs.paymentkit.com/guides/integration/paymentkit-js)**
10
-
11
- ## Installation
12
-
13
- ```bash
14
- npm install @payment-kit-js/vanilla
15
- ```
16
-
17
- ## Quick Start
18
-
19
- ```typescript
20
- import PaymentKit from '@payment-kit-js/vanilla';
21
- import CardPaymentMethod from '@payment-kit-js/vanilla/payment-methods/card';
22
-
23
- const paymentKit = PaymentKit({
24
- environment: 'production', // 'sandbox' or 'production'
25
- secureToken: 'checkout_session_token',
26
- paymentMethods: [CardPaymentMethod]
27
- });
28
-
29
- // Mount card inputs
30
- paymentKit.card.createElement('card_pan').mount('#card-number');
31
- paymentKit.card.createElement('card_exp').mount('#card-expiry');
32
- paymentKit.card.createElement('card_cvc').mount('#card-cvc');
33
-
34
- // Submit payment
35
- paymentKit.submit({
36
- fields: {
37
- customer_name: 'John Doe',
38
- customer_email: 'john@example.com',
39
- customer_country: 'US',
40
- customer_zip_code: '10001'
41
- },
42
- paymentMethod: 'card',
43
- onSuccess: (result) => console.log('Success:', result),
44
- onError: (errors) => console.error('Error:', errors)
45
- });
46
-
47
- // Cleanup when done
48
- paymentKit.cleanup();
49
- ```
50
-
51
- ## Payment Methods
52
-
53
- | Method | Import |
54
- |--------|--------|
55
- | Card | `@payment-kit-js/vanilla/payment-methods/card` |
56
- | PayPal | `@payment-kit-js/vanilla/payment-methods/paypal` |
57
- | Google Pay | `@payment-kit-js/vanilla/payment-methods/google-pay` |
58
-
59
- ## Configuration
60
-
61
- | Parameter | Type | Description |
62
- |-----------|------|-------------|
63
- | `environment` | `string` | `'sandbox'` or `'production'` |
64
- | `secureToken` | `string` | Checkout session token from your backend |
65
- | `paymentMethods` | `array` | Array of payment method handlers to enable |
66
-
67
- ## License
68
-
69
- MIT
9
+ **[PaymentKit.js Documentation](https://docs.paymentkit.com/guides/integration/sdk-reference/payment-kit-js/getting-started)**