xpay-redirect 0.4.0 → 1.1.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.
package/README.md CHANGED
@@ -1,53 +1,41 @@
1
1
  ## Installation
2
2
 
3
- xpay-redirect has a PayNowBtn and ftbScreenIndex module
3
+ `<script src="https://cdn.jsdelivr.net/npm/xpay-redirect@1.1.0/dist/index.min.js"></script>`
4
4
 
5
- **npm:**
5
+ ## Implementation
6
6
 
7
- ```
8
- npm install xpay-redirect
9
- ```
10
-
11
- ## Steps
12
-
13
- step 1: Install latest version `npm install xpay-redirect`.
14
-
15
- step 2: import modules and with props name `config`.
7
+ 1. open new page and implement this package.
16
8
 
17
9
  ```
18
- import {PayNowBtn, FtbScreenIndex} from 'xpay-redirect';
19
- import { BrowserRouter, Route, Routes } from 'react-router-dom';
20
- .
21
- .
22
- .
23
- let config = {
24
- .
25
- .
26
- .
27
- .
28
- onResponse: f() ,
29
- onError: f()
30
- };
31
-
32
- .
33
- .
34
- .
35
-
36
- <Route
37
- path='/'
38
- element={<PayNowBtn config={config}/>}
39
- />
40
- <Route
41
- exact
42
- path="/XPayConnector"
43
- element={<FtbScreenIndex config={config}/>}
44
- />
10
+ <div id="xpay-ftb-web-redirect"></div>
11
+
12
+ <script src="https://cdn.jsdelivr.net/npm/xpay-redirect@1.1.0/dist/index.min.js"></script>
13
+
14
+ <script>
15
+ const config = {
16
+ baseurl:string,
17
+ transactionDetails: {
18
+ txid: number,
19
+ amount: number,
20
+ purchaseCurrency: string,
21
+ purchaseAmount: number,
22
+ expiryTime: string,
23
+ },
24
+ popupStatus: string, // if tx is PENDING send '' empty string or send tx status at popupStatus
25
+ sessionid: string,
26
+ paymenttokenid: string,
27
+ merchantName: string,
28
+ merchantUrl: string,
29
+ onResponse: function(data){},
30
+ onError: function(data){},
31
+ onPopupClose: function(data){}
32
+ };
33
+
34
+ xpayftb.XpayRedirect(config);
35
+ </script>
45
36
  ```
46
37
 
47
38
  ## Note
48
39
 
49
- - onResponse and onError are function. Pass parameter and to get access of it.
50
-
51
- ## Example
52
-
53
- [Sample app](https://github.com/shankareshBB)
40
+ - if transaction is PENDING send '' empty string or send transaction status at popupStatus
41
+ - onResponse, onError and onPopupClose are function. Pass one parameter and to get access of it.