@rebilly/framepay 1.3.0 → 1.3.1
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 +16 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -45,21 +45,24 @@ It returns a promise that resolves with the FramePay instance.
|
|
|
45
45
|
import { loadFramepay } from '@rebilly/framepay';
|
|
46
46
|
|
|
47
47
|
try {
|
|
48
|
-
// Load FramePay
|
|
49
48
|
const framepay = await loadFramepay();
|
|
50
|
-
} catch (err) {
|
|
51
|
-
console.error('Failed to load Framepay: ', err);
|
|
52
|
-
}
|
|
53
49
|
|
|
54
|
-
// Use FramePay as normal.
|
|
55
|
-
// For complete examples, see: https://www.rebilly.com/docs/dev-docs/basic-setup
|
|
56
|
-
framepay.initialize({
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
});
|
|
60
|
-
framepay.on('
|
|
61
|
-
|
|
62
|
-
});
|
|
50
|
+
// Use FramePay as normal.
|
|
51
|
+
// For complete examples, see: https://www.rebilly.com/docs/dev-docs/basic-setup
|
|
52
|
+
framepay.initialize({
|
|
53
|
+
publishableKey: 'your-publishable-key',
|
|
54
|
+
// Additional configuration parameters
|
|
55
|
+
});
|
|
56
|
+
framepay.on('error', function (error) {
|
|
57
|
+
console.error('FramePay error:', error);
|
|
58
|
+
});
|
|
59
|
+
framepay.on('ready', function () {
|
|
60
|
+
// Your page should have a DOM element with the id "card-element"
|
|
61
|
+
framepay.card.mount('#card-element');
|
|
62
|
+
});
|
|
63
|
+
} catch (error) {
|
|
64
|
+
console.error('Failed to load Framepay: ', error);
|
|
65
|
+
}
|
|
63
66
|
```
|
|
64
67
|
|
|
65
68
|
### TypeScript Support
|