@jimrising/easymerchantsdk-react-native 1.5.9 → 1.6.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/README.md +30 -26
- package/android/build/.transforms/20e1216b87bd06eaab3c9e5c68d4267a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule.dex +0 -0
- package/android/build/.transforms/e9a664a11ce12edf79cd87b1e07aa243/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +1 -1
- package/ios/Pods/ViewControllers/OTPVerificationVC.swift +3 -2
- package/ios/Pods/ViewControllers/PaymentInformation/PaymentInfoVC.swift +3 -2
- package/ios/Pods/ViewControllers/ThreeDSecurePaymentDoneVC.swift +56 -20
- package/ios/easymerchantsdk.podspec +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ To add the path of sdk in your project. Open your `package.json` file and inside
|
|
|
7
7
|
|
|
8
8
|
```json
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@jimrising/easymerchantsdk-react-native": "^1.
|
|
10
|
+
"@jimrising/easymerchantsdk-react-native": "^1.6.1"
|
|
11
11
|
},
|
|
12
12
|
```
|
|
13
13
|
|
|
@@ -40,6 +40,10 @@ allprojects {
|
|
|
40
40
|
## Changes in IOS side.
|
|
41
41
|
Add below content inside the AppDelegate.swift File :-
|
|
42
42
|
|
|
43
|
+
## Requirements
|
|
44
|
+
- Ruby 3.2.8
|
|
45
|
+
|
|
46
|
+
|
|
43
47
|
Create a new file named AppDelegate.swift
|
|
44
48
|
```swift
|
|
45
49
|
import UIKit
|
|
@@ -174,12 +178,12 @@ const App = () => {
|
|
|
174
178
|
setLoading(true);
|
|
175
179
|
|
|
176
180
|
if (Platform.OS === 'android') {
|
|
177
|
-
|
|
181
|
+
const config = {
|
|
178
182
|
amount,
|
|
179
|
-
apiKey: 'apiKey',
|
|
180
|
-
secretKey: 'secretKey',
|
|
183
|
+
apiKey: 'apiKey', // replace with your apiKey
|
|
184
|
+
secretKey: 'secretKey', // replace with your secretKey
|
|
181
185
|
jsonConfig: {
|
|
182
|
-
environment: '
|
|
186
|
+
environment: 'sandbox',
|
|
183
187
|
amount,
|
|
184
188
|
tokenOnly: false,
|
|
185
189
|
currency: 'usd',
|
|
@@ -191,9 +195,9 @@ const App = () => {
|
|
|
191
195
|
showDonate: false,
|
|
192
196
|
showTotal: true,
|
|
193
197
|
showSubmitButton: true,
|
|
194
|
-
|
|
195
|
-
email: '
|
|
196
|
-
name: '
|
|
198
|
+
paymentMethod: ['card','ach'],
|
|
199
|
+
email: '', add your email
|
|
200
|
+
name: '', add your name
|
|
197
201
|
fields: {
|
|
198
202
|
visibility: { billing: false, additional: false },
|
|
199
203
|
billing: [
|
|
@@ -216,7 +220,7 @@ const App = () => {
|
|
|
216
220
|
allowCycles: 2,
|
|
217
221
|
intervals: ['Weekly', 'Monthly'],
|
|
218
222
|
recurringStartType: 'Custom',
|
|
219
|
-
recurringStartDate: '
|
|
223
|
+
recurringStartDate: '31/12/2026',
|
|
220
224
|
},
|
|
221
225
|
},
|
|
222
226
|
grailPayParams: {
|
|
@@ -227,23 +231,23 @@ const App = () => {
|
|
|
227
231
|
finderSubtitle: 'Search for your bank',
|
|
228
232
|
searchPlaceholder: 'Enter bank name',
|
|
229
233
|
},
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
234
|
+
appearanceSettings: {
|
|
235
|
+
theme: 'dark',
|
|
236
|
+
bodyBackgroundColor: '#121212',
|
|
237
|
+
containerBackgroundColor: '#1E1E1E',
|
|
238
|
+
primaryFontColor: '#FFFFFF',
|
|
239
|
+
secondaryFontColor: '#B0B0B0',
|
|
240
|
+
primaryButtonBackgroundColor: '#2563EB',
|
|
241
|
+
primaryButtonHoverColor: '#1D4ED8',
|
|
242
|
+
primaryButtonFontColor: '#FFFFFF',
|
|
243
|
+
secondaryButtonBackgroundColor: '#374151',
|
|
244
|
+
secondaryButtonHoverColor: '#4B5563',
|
|
245
|
+
secondaryButtonFontColor: '#E5E7EB',
|
|
246
|
+
borderRadius: '8',
|
|
247
|
+
fontSize: '14',
|
|
248
|
+
fontWeight: '500',
|
|
249
|
+
fontFamily: 'Inter, sans-serif'
|
|
250
|
+
}
|
|
247
251
|
},
|
|
248
252
|
};
|
|
249
253
|
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
#
|
|
1
|
+
#Tue Jun 24 09:49:20 IST 2025
|
|
@@ -504,8 +504,9 @@ class OTPVerificationVC: BaseVC {
|
|
|
504
504
|
if let data = serviceData,
|
|
505
505
|
let responseObj = try? JSONSerialization.jsonObject(with: data, options: []) as? [String: Any],
|
|
506
506
|
let message = responseObj["message"] as? String {
|
|
507
|
-
|
|
508
|
-
|
|
507
|
+
DispatchQueue.main.async {
|
|
508
|
+
self.showToast(message: message)
|
|
509
|
+
}
|
|
509
510
|
}
|
|
510
511
|
}
|
|
511
512
|
}
|
|
@@ -5085,8 +5085,9 @@ class PaymentInfoVC: BaseVC, BillingInfoVCDelegate {
|
|
|
5085
5085
|
if let data = serviceData,
|
|
5086
5086
|
let responseObj = try? JSONSerialization.jsonObject(with: data, options: []) as? [String: Any],
|
|
5087
5087
|
let message = responseObj["message"] as? String {
|
|
5088
|
-
|
|
5089
|
-
|
|
5088
|
+
DispatchQueue.main.async {
|
|
5089
|
+
self.showToast(message: message)
|
|
5090
|
+
}
|
|
5090
5091
|
}
|
|
5091
5092
|
}
|
|
5092
5093
|
}
|
|
@@ -6,13 +6,11 @@
|
|
|
6
6
|
//
|
|
7
7
|
|
|
8
8
|
import UIKit
|
|
9
|
-
//import SDWebImage
|
|
10
9
|
|
|
11
10
|
class ThreeDSecurePaymentDoneVC: BaseVC {
|
|
12
11
|
|
|
13
12
|
@IBOutlet weak var imgViewPaymentDone: UIImageView!
|
|
14
13
|
@IBOutlet weak var imgViewLoading: UIImageView!
|
|
15
|
-
// @IBOutlet weak var imgViewLoading: SDAnimatedImageView!
|
|
16
14
|
@IBOutlet weak var viewMain: UIView!
|
|
17
15
|
@IBOutlet weak var lblCompleteAuthentication: UILabel!
|
|
18
16
|
@IBOutlet weak var btnDone: UIButton!
|
|
@@ -144,26 +142,64 @@ class ThreeDSecurePaymentDoneVC: BaseVC {
|
|
|
144
142
|
oneMinuteCountdownTimer = nil
|
|
145
143
|
}
|
|
146
144
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
145
|
+
// func startRotatingImage() {
|
|
146
|
+
// let rotationAnimation = CABasicAnimation(keyPath: "transform.rotation")
|
|
147
|
+
// rotationAnimation.toValue = CGFloat.pi * 2 // 360 degrees in radians
|
|
148
|
+
// rotationAnimation.duration = 1 // Adjust the duration as needed
|
|
149
|
+
// rotationAnimation.isCumulative = true
|
|
150
|
+
// rotationAnimation.repeatCount = .infinity // Continuous rotation
|
|
151
|
+
// imgViewLoading.layer.add(rotationAnimation, forKey: "rotationAnimation")
|
|
152
|
+
// }
|
|
153
|
+
|
|
154
|
+
private func showHourglassGIF() {
|
|
155
|
+
guard let bundlePath = Bundle.easyPayBundle.path(forResource: "hourglass", ofType: "gif"),
|
|
156
|
+
let gifData = try? Data(contentsOf: URL(fileURLWithPath: bundlePath)),
|
|
157
|
+
let source = CGImageSourceCreateWithData(gifData as CFData, nil) else {
|
|
158
|
+
print("⚠️ Could not load GIF from bundle")
|
|
159
|
+
return
|
|
154
160
|
}
|
|
161
|
+
|
|
162
|
+
var images: [UIImage] = []
|
|
163
|
+
var duration: Double = 0
|
|
164
|
+
|
|
165
|
+
let frameCount = CGImageSourceGetCount(source)
|
|
166
|
+
for i in 0..<frameCount {
|
|
167
|
+
if let cgImage = CGImageSourceCreateImageAtIndex(source, i, nil) {
|
|
168
|
+
let frameDuration = getFrameDuration(from: source, index: i)
|
|
169
|
+
duration += frameDuration
|
|
170
|
+
images.append(UIImage(cgImage: cgImage))
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
if !images.isEmpty {
|
|
175
|
+
let animatedImage = UIImage.animatedImage(with: images, duration: duration)
|
|
176
|
+
imgViewLoading.image = animatedImage
|
|
177
|
+
imgViewLoading.contentMode = .scaleAspectFit
|
|
178
|
+
}
|
|
179
|
+
}
|
|
155
180
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
181
|
+
private func getFrameDuration(from source: CGImageSource, index: Int) -> Double {
|
|
182
|
+
let defaultFrameDuration = 0.1
|
|
183
|
+
|
|
184
|
+
guard let properties = CGImageSourceCopyPropertiesAtIndex(source, index, nil) as? [CFString: Any],
|
|
185
|
+
let gifProperties = properties[kCGImagePropertyGIFDictionary] as? [CFString: Any] else {
|
|
186
|
+
return defaultFrameDuration
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
if let unclampedDelay = gifProperties[kCGImagePropertyGIFUnclampedDelayTime] as? Double, unclampedDelay > 0 {
|
|
190
|
+
return unclampedDelay
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
if let delay = gifProperties[kCGImagePropertyGIFDelayTime] as? Double, delay > 0 {
|
|
194
|
+
return delay
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
return defaultFrameDuration
|
|
198
|
+
}
|
|
163
199
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
200
|
+
func startRotatingImage() {
|
|
201
|
+
showHourglassGIF()
|
|
202
|
+
}
|
|
167
203
|
|
|
168
204
|
private func setupTapOnLabel() {
|
|
169
205
|
if let url = redirectURL {
|
|
@@ -255,7 +291,7 @@ class ThreeDSecurePaymentDoneVC: BaseVC {
|
|
|
255
291
|
}
|
|
256
292
|
oneMinuteCountdownTimer?.resume()
|
|
257
293
|
|
|
258
|
-
//
|
|
294
|
+
// API check timer: runs continuously every 5 seconds until success/failure
|
|
259
295
|
apiStatusCheckTimer = Timer.scheduledTimer(withTimeInterval: 5.0, repeats: true) { [weak self] _ in
|
|
260
296
|
guard let self = self else { return }
|
|
261
297
|
self.checkThreeDSecureStatus(completion: nil)
|