@tender-cash/agent-sdk-react 1.1.2 → 1.2.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.
@@ -1,7 +1,7 @@
1
1
  "use strict";var T1=Object.defineProperty;var N1=(n,i,o)=>i in n?T1(n,i,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[i]=o;var Ka=(n,i,o)=>N1(n,typeof i!="symbol"?i+"":i,o);/**
2
2
  * agent-sdk-react.js
3
3
  * @summary
4
- * @version v1.1.2
4
+ * @version v1.2.0
5
5
  * @author Tender
6
6
  * @license Released under the MIT license.
7
7
  * @copyright Tender Cash
@@ -6,7 +6,7 @@ import Et, { forwardRef as Zo, createElement as Z0, useEffect as nt, useCallback
6
6
  /**
7
7
  * agent-sdk-react.js
8
8
  * @summary
9
- * @version v1.1.2
9
+ * @version v1.2.0
10
10
  * @author Tender
11
11
  * @license Released under the MIT license.
12
12
  * @copyright Tender Cash
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tender-cash/agent-sdk-react",
3
3
  "license": "MIT",
4
- "version": "1.1.2",
4
+ "version": "1.2.0",
5
5
  "repository": "git://github.com/tender-cash/agent-sdk-react.git",
6
6
  "description": "",
7
7
  "author": "Tender",
package/readme.md CHANGED
@@ -86,6 +86,10 @@ import { TenderAgentSdk, TenderAgentRef } from '@tender-cash/agent-sdk-react';
86
86
  function PaymentComponent() {
87
87
  const tenderRef = useRef<TenderAgentRef>(null);
88
88
 
89
+ const handleEventResponse = (response) => {
90
+ console.log("response");
91
+ }
92
+
89
93
  const handleOpenPayment = () => {
90
94
  tenderRef.current?.initiatePayment({
91
95
  amount: 150.00,
@@ -109,7 +113,7 @@ function PaymentComponent() {
109
113
  accessId="YOUR_ACCESS_ID"
110
114
  fiatCurrency="USD"
111
115
  env="test"
112
- onEventResponse={(response) => console.log(response)}
116
+ onEventResponse={handleEventResponse}
113
117
  amount={150.00}
114
118
  referenceId="unique-payment-reference-123"
115
119
  paymentExpirySeconds={1800}
@@ -124,8 +128,7 @@ function PaymentComponent() {
124
128
  | Method | Description |
125
129
  |-------------------|-----------------------------------------------------------------------------|
126
130
  | `initiatePayment` | Opens the modal and initiates a payment with the provided parameters. |
127
- | `dismiss` | Closes the modal. |
128
- | `closeModal` | Closes the modal - can be called from outside the widget. |
131
+ | `dismiss` | Closes the modal. |
129
132
 
130
133
  ## Callback Data (`onFinishResponse`)
131
134