@jimrising/easymerchantsdk-react-native 1.6.0 → 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 +5 -1
- 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/Classes/EasyMerchantSdk.m +2 -2
- 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.6.
|
|
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
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
#
|
|
1
|
+
#Tue Jun 24 09:49:20 IST 2025
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
#import <React/RCTLog.h>
|
|
3
3
|
#import <React/RCTBridgeModule.h>
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
#import <easymerchantsdk-Swift.h>
|
|
6
|
+
//#import <easymerchantsdk/easymerchantsdk-Swift.h>
|
|
7
7
|
|
|
8
8
|
@interface EasyMerchantSdk ()
|
|
9
9
|
@property (nonatomic, strong) EasyMerchantSdkPlugin *sdkPluginInstance;
|
|
@@ -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)
|