@jimrising/easymerchantsdk-react-native 1.0.0 → 1.0.2
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 +16 -9
- package/ios/Classes/EasyMerchantSdk.swift +0 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ To add the path of sdk in your project. Open your `package.json` file and inside
|
|
|
8
8
|
```json
|
|
9
9
|
"dependencies": {
|
|
10
10
|
...
|
|
11
|
-
"easymerchantsdk-react-native": "^1.0.
|
|
11
|
+
"easymerchantsdk-react-native": "^1.0.2"
|
|
12
12
|
},
|
|
13
13
|
```
|
|
14
14
|
or using command
|
|
@@ -37,9 +37,13 @@ allprojects {
|
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
## Changes in IOS side.
|
|
40
|
+
|
|
41
|
+
### If project is based on Objective-C :-
|
|
42
|
+
No need to create any AppDelegate.swift File.
|
|
43
|
+
|
|
44
|
+
### If project is based on Swift :-
|
|
40
45
|
Add below content inside the AppDelegate.swift File :-
|
|
41
46
|
|
|
42
|
-
Create a new file named AppDelegate.swift
|
|
43
47
|
```swift
|
|
44
48
|
import UIKit
|
|
45
49
|
import easymerchantsdk
|
|
@@ -93,7 +97,8 @@ var window: UIWindow?
|
|
|
93
97
|
}
|
|
94
98
|
```
|
|
95
99
|
|
|
96
|
-
|
|
100
|
+
|
|
101
|
+
### inside the PodFile add below
|
|
97
102
|
```pod
|
|
98
103
|
|
|
99
104
|
require_relative '../node_modules/react-native/scripts/react_native_pods'
|
|
@@ -140,7 +145,7 @@ const App = () => {
|
|
|
140
145
|
const additionalInfoRequest = {
|
|
141
146
|
name: "Test User",
|
|
142
147
|
email: "test@gmail.com",
|
|
143
|
-
phone_number: "
|
|
148
|
+
phone_number: "9815404694",
|
|
144
149
|
country_code: "91",
|
|
145
150
|
description: "Test"
|
|
146
151
|
};
|
|
@@ -149,7 +154,7 @@ const App = () => {
|
|
|
149
154
|
address: "Mohali, Punjab",
|
|
150
155
|
country: "India",
|
|
151
156
|
state: "Punjab",
|
|
152
|
-
city: "
|
|
157
|
+
city: "Mohali",
|
|
153
158
|
postal_code: "140118",
|
|
154
159
|
additional_info: additionalInfoRequest
|
|
155
160
|
};
|
|
@@ -158,12 +163,14 @@ const App = () => {
|
|
|
158
163
|
|
|
159
164
|
try {
|
|
160
165
|
if (Platform.OS === 'android') {
|
|
161
|
-
//
|
|
162
|
-
const response = await RNEasymerchantsdk.billing(amount, null,'sandbox','
|
|
166
|
+
// const response = await RNEasymerchantsdk.billing(amount, null,'staging','apiKey','secretKey');
|
|
167
|
+
const response = await RNEasymerchantsdk.billing(amount, null,'sandbox','apiKey','secretKey');
|
|
168
|
+
// const response = await RNEasymerchantsdk.billing(amount, null,'production','apiKey','secretKey');
|
|
163
169
|
setPaymentResponse(`Payment Success: ${response}`);
|
|
164
170
|
} else if (Platform.OS === 'ios') {
|
|
165
|
-
const result = await EasyMerchantSdk.billing(amount, jsonString,'staging','
|
|
166
|
-
//
|
|
171
|
+
const result = await EasyMerchantSdk.billing(amount, jsonString,'staging','apiKey','secretKey');
|
|
172
|
+
// const result = await EasyMerchantSdk.billing(amount, jsonString,'sandbox','apiKey','secretKey');
|
|
173
|
+
// const result = await EasyMerchantSdk.billing(amount, jsonString,'production','apiKey','secretKey');
|
|
167
174
|
setBillingResult(`Billing Success: ${result}`);
|
|
168
175
|
}
|
|
169
176
|
} catch (error) {
|