@jimrising/easymerchantsdk-react-native 2.5.2 → 2.5.3
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/android/build.gradle +1 -1
- package/ios/ApiManager/APIHeaders.swift +0 -6
- package/ios/ApiManager/APIRequest.swift +3 -8
- package/ios/Classes/EasyMerchantSdk.m +2 -2
- package/ios/Classes/EasyMerchantSdk.swift +25 -13
- package/ios/Helper/GrailPayHelper.swift +1 -0
- package/ios/Models/Request.swift +3 -3
- package/ios/Pods/Storyboard/EasyPaySdk.storyboard +83 -83
- package/ios/Pods/ViewControllers/AdditionalInfoVC.swift +26 -3
- package/ios/Pods/ViewControllers/BillingInfoVC/BillingInfoVC.swift +10 -10
- package/ios/Pods/ViewControllers/GrailPayVC.swift +260 -268
- package/ios/Pods/ViewControllers/OTPVerificationVC.swift +74 -13
- package/ios/Pods/ViewControllers/PaymentInformation/PaymentInfoVC.swift +266 -131
- package/ios/Pods/ViewControllers/PaymentInformation/RecurringTVC.swift +3 -0
- package/ios/Pods/ViewControllers/PaymentStatusWebViewVC.swift +1 -32
- package/ios/Pods/ViewControllers/ThreeDSecurePaymentDoneVC.swift +10 -6
- package/ios/easymerchantsdk.podspec +1 -1
- package/package.json +1 -1
- package/ACH_CHARGE_ENDPOINT_TRACE.md +0 -69
|
@@ -5,37 +5,6 @@
|
|
|
5
5
|
// Created by Mony's Mac on 17/07/25.
|
|
6
6
|
//
|
|
7
7
|
|
|
8
|
-
//import UIKit
|
|
9
|
-
//import WebKit
|
|
10
|
-
//
|
|
11
|
-
//class PaymentStatusWebViewVC: UIViewController {
|
|
12
|
-
//
|
|
13
|
-
// var urlString: String?
|
|
14
|
-
// private var webView: WKWebView!
|
|
15
|
-
//
|
|
16
|
-
// override func viewDidLoad() {
|
|
17
|
-
// super.viewDidLoad()
|
|
18
|
-
// setupWebView()
|
|
19
|
-
// loadRequestedURL()
|
|
20
|
-
// }
|
|
21
|
-
//
|
|
22
|
-
// private func setupWebView() {
|
|
23
|
-
// webView = WKWebView(frame: self.view.bounds)
|
|
24
|
-
// webView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
|
|
25
|
-
// self.view.addSubview(webView)
|
|
26
|
-
// }
|
|
27
|
-
//
|
|
28
|
-
// private func loadRequestedURL() {
|
|
29
|
-
// guard let urlString = urlString, let url = URL(string: urlString) else {
|
|
30
|
-
// return
|
|
31
|
-
// }
|
|
32
|
-
// let request = URLRequest(url: url)
|
|
33
|
-
// webView.load(request)
|
|
34
|
-
// }
|
|
35
|
-
//
|
|
36
|
-
//}
|
|
37
|
-
|
|
38
|
-
|
|
39
8
|
import UIKit
|
|
40
9
|
import WebKit
|
|
41
10
|
|
|
@@ -97,7 +66,7 @@ class PaymentStatusWebViewVC: UIViewController, WKNavigationDelegate {
|
|
|
97
66
|
@objc private func closeButtonTapped() {
|
|
98
67
|
self.navigationController?.popViewController(animated: true)
|
|
99
68
|
}
|
|
100
|
-
|
|
69
|
+
|
|
101
70
|
// MARK: - WKNavigationDelegate
|
|
102
71
|
func webView(_ webView: WKWebView, didStartProvisionalNavigation navigation: WKNavigation!) {
|
|
103
72
|
activityIndicator.startAnimating()
|
|
@@ -215,7 +215,7 @@
|
|
|
215
215
|
// lblCompleteAuthentication.text = "Wating for 3DS Authentication..."
|
|
216
216
|
// btnContinue.isHidden = true
|
|
217
217
|
//
|
|
218
|
-
// let vc =
|
|
218
|
+
// let vc = easymerchantsdk.instantiateViewController(withIdentifier: "PaymentStatusWebViewVC") as! PaymentStatusWebViewVC
|
|
219
219
|
// vc.urlString = urlStr // Pass the URL to WebView VC
|
|
220
220
|
// self.navigationController?.pushViewController(vc, animated: true)
|
|
221
221
|
// }
|
|
@@ -744,14 +744,15 @@ class ThreeDSecurePaymentDoneVC: BaseVC {
|
|
|
744
744
|
viewPaymentDetails.isHidden = false
|
|
745
745
|
btnContinue.isHidden = true
|
|
746
746
|
|
|
747
|
-
|
|
747
|
+
apiStatusCheckTimer?.invalidate()
|
|
748
|
+
apiStatusCheckTimer = nil
|
|
748
749
|
}
|
|
749
750
|
}
|
|
750
751
|
|
|
751
752
|
override func viewWillDisappear(_ animated: Bool) {
|
|
752
753
|
super.viewWillDisappear(animated)
|
|
753
|
-
//
|
|
754
|
-
// Only stop
|
|
754
|
+
// Don't stop polling when pushing the 3DS WebView; Android keeps polling while the user
|
|
755
|
+
// completes authentication. Only stop when this VC is actually being dismissed/popped.
|
|
755
756
|
if isMovingFromParent || isBeingDismissed {
|
|
756
757
|
stopStatusTimers()
|
|
757
758
|
}
|
|
@@ -822,7 +823,7 @@ class ThreeDSecurePaymentDoneVC: BaseVC {
|
|
|
822
823
|
lblCompleteAuthentication.text = "Waiting for 3DS Authentication..."
|
|
823
824
|
btnContinue.isHidden = true
|
|
824
825
|
|
|
825
|
-
let vc =
|
|
826
|
+
let vc = easymerchantsdk.instantiateViewController(withIdentifier: "PaymentStatusWebViewVC") as! PaymentStatusWebViewVC
|
|
826
827
|
vc.urlString = urlStr
|
|
827
828
|
self.navigationController?.pushViewController(vc, animated: true)
|
|
828
829
|
}
|
|
@@ -921,7 +922,7 @@ class ThreeDSecurePaymentDoneVC: BaseVC {
|
|
|
921
922
|
self.lblRefferenceId.text = refToken
|
|
922
923
|
self.lblPaymentMethodValue.text = "Card"
|
|
923
924
|
}
|
|
924
|
-
// Match Android: timeout shows warning UI only.
|
|
925
|
+
// Match Android behavior: timeout shows warning UI only.
|
|
925
926
|
}
|
|
926
927
|
}
|
|
927
928
|
}
|
|
@@ -1158,6 +1159,9 @@ class ThreeDSecurePaymentDoneVC: BaseVC {
|
|
|
1158
1159
|
self.imgViewPaymentDone.tintColor = .systemRed
|
|
1159
1160
|
self.lblCompleteAuthentication.text = "Authentication Expired"
|
|
1160
1161
|
} else {
|
|
1162
|
+
// Includes "completed" and any other non-initiated status.
|
|
1163
|
+
// Android's catch-all shows the "success" icon for any non-initiated status
|
|
1164
|
+
// except explicit failure/expired.
|
|
1161
1165
|
self.imgViewPaymentDone.image = UIImage(named: "payment_done_icon", in: .easyPayBundle, compatibleWith: nil)
|
|
1162
1166
|
self.imgViewPaymentDone.tintColor = nil
|
|
1163
1167
|
self.lblCompleteAuthentication.text = "Authentication Completed"
|
package/package.json
CHANGED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
# Back-trace: `/api/v1/ach/charge` → PaymentInfoVC only (ignore billing/additional)
|
|
2
|
-
|
|
3
|
-
Endpoint: **`/api/v1/ach/charge`**
|
|
4
|
-
Built as: `EnvironmentConfig.baseURL + EnvironmentConfig.Endpoints.achCharge.path()`
|
|
5
|
-
File: **`em-MobileCheckoutSDK-ReactNative/ios/Pods/ViewControllers/PaymentInformation/PaymentInfoVC.swift`**
|
|
6
|
-
|
|
7
|
-
Billing and Additional Info flows (BillingInfoVC / AdditionalInfoVC) are ignored here; only direct ACH charge from PaymentInfoVC is listed.
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## 1. Manual bank form (bank fields) — **Next** button
|
|
12
|
-
|
|
13
|
-
- **Action:** `actionBtnNext`
|
|
14
|
-
- **When:** Bank selected, manual bank fields form, **no billing/additional** (or nil `request.fields`).
|
|
15
|
-
- **Direct ACH call:**
|
|
16
|
-
- **`accountBankChargeApi()`** (~line 9023)
|
|
17
|
-
- **`accountChargeApi()`** (no-arg, ~line 8816)
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## 2. New manual ACH (add new bank account) — **Pay** button
|
|
22
|
-
|
|
23
|
-
- **Action:** `actionBtnPayNowNewAccountView`
|
|
24
|
-
- **When:** Add-new-bank-account form, **no billing/additional** (and no OTP needed, or billing nil).
|
|
25
|
-
- **Direct ACH call:**
|
|
26
|
-
- **`accountBankChargeAddNewAccountApi()`** (~line 9926) — when no billing/additional and no OTP
|
|
27
|
-
- **`accountChargeAddNewAccountApi()`** (~line 9724) — when `request.fields` is nil and not saving
|
|
28
|
-
- **`accountChargeApi(customerId:)`** (~line 10183) — when `request.fields` is nil and saving (has customerId)
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
## 3. Saved bank (single saved account) — **Pay** button
|
|
33
|
-
|
|
34
|
-
- **Action:** `actionBtnPayNowSingleAccountView`
|
|
35
|
-
- **When:** Saved bank selected, **no billing/additional**.
|
|
36
|
-
- **Direct ACH call:**
|
|
37
|
-
- **`grailPayAaccountChargeSingleSavedAccountApi()`** (~line 4830)
|
|
38
|
-
- (In other branch when not authenticated ACH: **`accountBankChargeSavedBankAccountApi()`** — in PaymentInfoVC; if present it also hits ach/charge.)
|
|
39
|
-
|
|
40
|
-
---
|
|
41
|
-
|
|
42
|
-
## 4. GrailPay — existing linked account
|
|
43
|
-
|
|
44
|
-
- **Action:** Same **Next**-button flow when GrailPay + existing account, **no billing/additional**.
|
|
45
|
-
- **Direct ACH call:**
|
|
46
|
-
- **`grailPayAccountChargeApi()`** (~line 4149) — no save
|
|
47
|
-
- **`grailPayAccountChargeWithSaveApi()`** (~line 4365) — with save
|
|
48
|
-
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
## 5. GrailPay — new account
|
|
52
|
-
|
|
53
|
-
- **Action:** New GrailPay account flow, **no billing/additional**.
|
|
54
|
-
- **Direct ACH call:**
|
|
55
|
-
- **`grailPayNewAccountChargeApi()`** (~line 4598)
|
|
56
|
-
|
|
57
|
-
---
|
|
58
|
-
|
|
59
|
-
## Summary (PaymentInfoVC only, no billing/additional)
|
|
60
|
-
|
|
61
|
-
| Button / flow | API method that calls ach/charge |
|
|
62
|
-
|----------------------------------|-----------------------------------------------------|
|
|
63
|
-
| **actionBtnNext** (manual bank) | `accountBankChargeApi`, `accountChargeApi()` |
|
|
64
|
-
| **actionBtnPayNowNewAccountView**| `accountBankChargeAddNewAccountApi`, `accountChargeAddNewAccountApi`, `accountChargeApi(customerId:)` |
|
|
65
|
-
| **actionBtnPayNowSingleAccountView** | `grailPayAaccountChargeSingleSavedAccountApi` (and `accountBankChargeSavedBankAccountApi` in another branch) |
|
|
66
|
-
| GrailPay existing (Next) | `grailPayAccountChargeApi`, `grailPayAccountChargeWithSaveApi` |
|
|
67
|
-
| GrailPay new | `grailPayNewAccountChargeApi` |
|
|
68
|
-
|
|
69
|
-
All of the above use **`EnvironmentConfig.Endpoints.achCharge.path()`** → **`/api/v1/ach/charge`**.
|