Skip to content

Commit ef01739

Browse files
committed
Update readme & types making partnerOrderId mandatory for receiving order events
1 parent d4e6d19 commit ef01739

File tree

6 files changed

+4472
-3585
lines changed

6 files changed

+4472
-3585
lines changed

README.md

+12-6
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,15 @@ npm i @react-native-community/netinfo
1919
## Example usage
2020

2121
```tsx
22-
import { TransakWebView, Environments, Events, TransakConfig, EventTypes, Order } from '@transak/react-native-sdk';
22+
import {
23+
TransakWebView, Environments, Events, TransakConfig, EventTypes, Order,
24+
} from '@transak/react-native-sdk';
2325

2426
function TransakWebViewIntegration() {
2527
const transakConfig: TransakConfig = {
26-
apiKey: '<your-api-key>', // (Required)
27-
environment: Environments.STAGING/Environments.PRODUCTION, // (Required)
28+
apiKey: '<your-api-key>', // Required
29+
environment: Environments.STAGING/Environments.PRODUCTION, // Required
30+
partnerOrderId: '<unique-order-id-generated-by-your-system>', // Required to receive order events
2831
// .....
2932
// For the full list of query params refer Props section below
3033
};
@@ -64,9 +67,12 @@ function TransakWebViewIntegration() {
6467
|:---------------|:------------------------------------------------------------------------------------------------------|
6568
| transakConfig | Refer [here](https://docs.transak.com/docs/sdk) for the full list of customisation options |
6669
| onTransakEvent | Callback function to listen to order related [events](https://docs.transak.com/docs/websocket-events) |
67-
<br />
68-
This component accepts most of the [react-native-webview props](https://github.com/react-native-webview/react-native-webview/blob/HEAD/docs/Reference.md), except the following: sharedCookiesEnabled, injectedJavaScript, injectedJavaScriptBeforeContentLoaded
70+
71+
<br />This component accepts most of the [react-native-webview props](https://github.com/react-native-webview/react-native-webview/blob/HEAD/docs/Reference.md), except the following: sharedCookiesEnabled, injectedJavaScript, injectedJavaScriptBeforeContentLoaded
72+
73+
> [!CAUTION]
74+
> The partnerOrderId must be passed in the transakConfig to receive order events.
6975
7076
## License
7177

72-
ISC Licensed. Copyright (c) 2023 Transak Inc.
78+
ISC Licensed. Copyright (c) 2024 Transak Inc.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@transak/react-native-sdk",
3-
"version": "2.0.1",
3+
"version": "2.0.2",
44
"description": "A React Native SDK for decentralised applications to onboard their global user base with fiat currency",
55
"type": "module",
66
"types": "lib/index.d.ts",
@@ -20,7 +20,7 @@
2020
"engines": {
2121
"node": ">=18.0.0"
2222
},
23-
"packageManager": "pnpm@8.15.3+sha256.fc4a49bd609550a41e14d20efbce802a4b892aa4cac877322de2f0924f122991",
23+
"packageManager": "pnpm@9.3.0+sha256.e1f9e8d1a16607a46dd3c158b5f7a7dc7945501d1c6222d454d63d033d1d918f",
2424
"files": [
2525
"lib/**/*"
2626
],

0 commit comments

Comments
 (0)