@tender-cash/agent-sdk-react 1.1.2 → 1.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/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.1",
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