@paynext/sdk 0.0.165 → 0.0.166
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 +46 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
TypeScript SDK for integrating PayNext payment processing with full type safety and multiple payment methods support.
|
|
4
4
|
|
|
5
|
+
## 🛡️ NEW: PCI-Compliant Iframe Mode
|
|
6
|
+
|
|
7
|
+
Enable iframe mode for enhanced PCI compliance by adding one parameter:
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
await checkout.mount('checkout-container', {
|
|
11
|
+
clientToken: 'your-token',
|
|
12
|
+
environment: 'production',
|
|
13
|
+
apiVersion: 'v1',
|
|
14
|
+
iframeMode: true, // 🛡️ Isolates payment data in secure iframe
|
|
15
|
+
})
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**Benefits:** Reduced PCI scope, isolated processing, XSS protection. See [Iframe Quick Start](./IFRAME_QUICKSTART.md) for details.
|
|
19
|
+
|
|
5
20
|
## Installation
|
|
6
21
|
|
|
7
22
|
```bash
|
|
@@ -101,10 +116,11 @@ export const CheckoutComponent: FC<Readonly<IProps>> = (props) => {
|
|
|
101
116
|
## Configuration
|
|
102
117
|
|
|
103
118
|
```typescript
|
|
104
|
-
interface PayNextConfig {
|
|
119
|
+
interface PayNextConfigExtended extends PayNextConfig {
|
|
105
120
|
clientToken: string
|
|
106
121
|
apiVersion: string
|
|
107
|
-
environment: 'sandbox' | 'production'
|
|
122
|
+
environment: 'develop' | 'staging' | 'sandbox' | 'production'
|
|
123
|
+
iframeMode?: boolean // 🛡️ Enable PCI-compliant iframe mode (default: false)
|
|
108
124
|
variant?: 'default' | 'compact'
|
|
109
125
|
locale?: Locale
|
|
110
126
|
translate?: CheckoutTranslate
|
|
@@ -194,4 +210,31 @@ The SDK supports recent versions of all major browsers:
|
|
|
194
210
|
|
|
195
211
|
## Security
|
|
196
212
|
|
|
197
|
-
PCI
|
|
213
|
+
### PCI Compliance
|
|
214
|
+
|
|
215
|
+
**Iframe Mode (Recommended)**: Enables PCI-compliant iframe isolation for reduced compliance scope.
|
|
216
|
+
|
|
217
|
+
```typescript
|
|
218
|
+
await checkout.mount('checkout-container', {
|
|
219
|
+
iframeMode: true, // Isolates payment data processing
|
|
220
|
+
// ... other config
|
|
221
|
+
})
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### Content Security Policy
|
|
225
|
+
|
|
226
|
+
For iframe mode, add to your HTML:
|
|
227
|
+
|
|
228
|
+
```html
|
|
229
|
+
<meta http-equiv="Content-Security-Policy"
|
|
230
|
+
content="frame-src https://cdn-sdk.paynext.com https://cdn-sdk-dev.paynext.com;">
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### Security Features
|
|
234
|
+
|
|
235
|
+
- PCI DSS Level 1 compliant
|
|
236
|
+
- End-to-end encryption (TLS 1.3)
|
|
237
|
+
- Tokenization of sensitive data
|
|
238
|
+
- No sensitive payment data stored locally
|
|
239
|
+
- Optional iframe isolation for reduced PCI scope
|
|
240
|
+
- Sandbox iframe security attributes (when iframe mode enabled)
|