@pulsebyshiga/collect-react-native 0.2.0 → 0.2.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 +21 -19
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
# @pulsebyshiga/collect-react-native
|
|
2
2
|
|
|
3
|
-
React Native bindings for Pulse Collect —
|
|
4
|
-
web inside a WebView, with events delivered through the native message bridge.
|
|
3
|
+
React Native bindings for Pulse Collect — render the same Pulse-hosted payment embed used on
|
|
4
|
+
the web inside a WebView, with events delivered through the native message bridge. Your brand
|
|
5
|
+
and your screen; the key and user PII stay on your backend.
|
|
5
6
|
|
|
6
|
-
> **
|
|
7
|
-
>
|
|
7
|
+
> **Pre-release (0.2.0).** The public API may still change. Validate on physical devices before
|
|
8
|
+
> shipping.
|
|
8
9
|
|
|
9
10
|
## Requirements
|
|
10
11
|
|
|
11
|
-
- React ≥ 18 and `react-native-webview` ≥ 13 (peer dependencies)
|
|
12
|
-
- A session token (`cs_*`) minted by your backend with [`@pulsebyshiga/node`](
|
|
12
|
+
- React ≥ 18 and `react-native-webview` ≥ 13 (peer dependencies).
|
|
13
|
+
- A session token (`cs_*`) minted by your backend with [`@pulsebyshiga/node`](https://www.npmjs.com/package/@pulsebyshiga/node).
|
|
13
14
|
|
|
14
15
|
## Installation
|
|
15
16
|
|
|
@@ -18,7 +19,7 @@ npm install @pulsebyshiga/collect-react-native react-native-webview
|
|
|
18
19
|
# then: cd ios && pod install (bare RN) — Expo projects need no extra step
|
|
19
20
|
```
|
|
20
21
|
|
|
21
|
-
##
|
|
22
|
+
## Quickstart
|
|
22
23
|
|
|
23
24
|
```tsx
|
|
24
25
|
import { PulseCollectPayment } from '@pulsebyshiga/collect-react-native';
|
|
@@ -49,21 +50,22 @@ export function FundScreen({ sessionToken }: { sessionToken: string }) {
|
|
|
49
50
|
|
|
50
51
|
## Platform notes
|
|
51
52
|
|
|
52
|
-
- **Configuration travels in the URL.** Theme and copy are applied via URL params at load —
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
- **Height** — the embed reports its content height; the wrapper tracks it automatically
|
|
56
|
-
unless you pass `style`. `onResize(height)` exposes the raw signal.
|
|
57
|
-
- **Events** — all embed events arrive through `onMessage` on the WebView; the wrapper
|
|
58
|
-
validates and dispatches them to your typed callbacks (`dispatchEmbedMessage` is exported
|
|
59
|
-
for custom WebView setups).
|
|
53
|
+
- **Configuration travels in the URL.** Theme and copy are applied via URL params at load — there is no message-in channel on React Native, so changing `theme`/`strings` props reloads the WebView (the memoized source changes).
|
|
54
|
+
- **Height** — the embed reports its content height; the wrapper tracks it automatically unless you pass `style`. `onResize(height)` exposes the raw signal.
|
|
55
|
+
- **Events** — all embed events arrive through `onMessage` on the WebView; the wrapper validates and dispatches them to your typed callbacks (`dispatchEmbedMessage` is exported for custom WebView setups).
|
|
60
56
|
|
|
61
57
|
## Security model
|
|
62
58
|
|
|
63
|
-
Identical to the web: your `sk_*` key and user PII stay on your backend; the app receives
|
|
64
|
-
|
|
65
|
-
|
|
59
|
+
Identical to the web: your `sk_*` key and user PII stay on your backend; the app receives only
|
|
60
|
+
the single-order `cs_*` token, and the payment surface renders inside Pulse-hosted content.
|
|
61
|
+
Credit users exclusively from the signed `disbursement.completed` webhook.
|
|
62
|
+
|
|
63
|
+
## Related packages
|
|
64
|
+
|
|
65
|
+
- [`@pulsebyshiga/collect-js`](https://www.npmjs.com/package/@pulsebyshiga/collect-js) — the framework-agnostic loader this wraps.
|
|
66
|
+
- [`@pulsebyshiga/collect-react`](https://www.npmjs.com/package/@pulsebyshiga/collect-react) — React (web) bindings.
|
|
67
|
+
- [`@pulsebyshiga/node`](https://www.npmjs.com/package/@pulsebyshiga/node) — backend SDK: sessions, orders, webhook verification.
|
|
66
68
|
|
|
67
69
|
## License
|
|
68
70
|
|
|
69
|
-
|
|
71
|
+
MIT © Shiga Digital
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pulsebyshiga/collect-react-native",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "React Native bindings for Pulse Collect — <PulseCollectPayment /> rendering the same Pulse-controlled embed in a WebView",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Shiga Digital",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"react-native-webview": ">=13"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@pulsebyshiga/collect-js": "0.2.
|
|
30
|
+
"@pulsebyshiga/collect-js": "0.2.1"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/react": "^18.3.12",
|