@jimrising/easymerchantsdk-react-native 1.7.6 → 1.7.7
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 +1 -1
- package/ios/Pods/ViewControllers/AdditionalInfoVC.swift +2 -2
- package/ios/Pods/ViewControllers/BillingInfoVC/BillingInfoVC.swift +2 -0
- package/ios/Pods/ViewControllers/OTPVerificationVC.swift +2 -2
- package/ios/Pods/ViewControllers/PaymentInformation/PaymentInfoVC.swift +2 -0
- package/ios/Pods/ViewControllers/ThreeDSecurePaymentDoneVC.swift +20 -10
- package/ios/easymerchantsdk.podspec +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1709,7 +1709,7 @@ class AdditionalInfoVC: BaseVC {
|
|
|
1709
1709
|
// Conditionally pass raw FieldItem array
|
|
1710
1710
|
paymentDoneVC.visibility = self.visibility
|
|
1711
1711
|
paymentDoneVC.amount = self.amount
|
|
1712
|
-
|
|
1712
|
+
paymentDoneVC.cardApiParams = params
|
|
1713
1713
|
// if self.visibility?.billing == true {
|
|
1714
1714
|
paymentDoneVC.billingInfoData = self.billingInfo
|
|
1715
1715
|
var billingDict: [String: Any] = [:]
|
|
@@ -1906,7 +1906,7 @@ class AdditionalInfoVC: BaseVC {
|
|
|
1906
1906
|
// Conditionally pass raw FieldItem array
|
|
1907
1907
|
paymentDoneVC.visibility = self.visibility
|
|
1908
1908
|
paymentDoneVC.amount = self.amount
|
|
1909
|
-
|
|
1909
|
+
paymentDoneVC.cardApiParams = params
|
|
1910
1910
|
// if self.visibility?.billing == true {
|
|
1911
1911
|
paymentDoneVC.billingInfoData = self.billingInfo
|
|
1912
1912
|
var billingDict: [String: Any] = [:]
|
|
@@ -1179,6 +1179,7 @@ class BillingInfoVC: BaseVC {
|
|
|
1179
1179
|
// Conditionally pass raw FieldItem array
|
|
1180
1180
|
paymentDoneVC.visibility = self.visibility
|
|
1181
1181
|
paymentDoneVC.amount = self.amount
|
|
1182
|
+
paymentDoneVC.cardApiParams = params
|
|
1182
1183
|
|
|
1183
1184
|
// if self.visibility?.billing == true {
|
|
1184
1185
|
paymentDoneVC.billingInfoData = self.billingInfo
|
|
@@ -1356,6 +1357,7 @@ class BillingInfoVC: BaseVC {
|
|
|
1356
1357
|
// Conditionally pass raw FieldItem array
|
|
1357
1358
|
paymentDoneVC.visibility = self.visibility
|
|
1358
1359
|
paymentDoneVC.amount = self.amount
|
|
1360
|
+
paymentDoneVC.cardApiParams = params
|
|
1359
1361
|
|
|
1360
1362
|
// if self.visibility?.billing == true {
|
|
1361
1363
|
paymentDoneVC.billingInfoData = self.billingInfo
|
|
@@ -1634,7 +1634,7 @@ class OTPVerificationVC: BaseVC {
|
|
|
1634
1634
|
paymentDoneVC.redirectURL = urlString
|
|
1635
1635
|
paymentDoneVC.chargeData = responseObject
|
|
1636
1636
|
paymentDoneVC.easyPayDelegate = self.easyPayDelegate
|
|
1637
|
-
|
|
1637
|
+
paymentDoneVC.cardApiParams = params
|
|
1638
1638
|
self.navigationController?.pushViewController(paymentDoneVC, animated: true)
|
|
1639
1639
|
}
|
|
1640
1640
|
}
|
|
@@ -1812,7 +1812,7 @@ class OTPVerificationVC: BaseVC {
|
|
|
1812
1812
|
// Conditionally pass raw FieldItem array
|
|
1813
1813
|
paymentDoneVC.visibility = self.visibility
|
|
1814
1814
|
paymentDoneVC.amount = self.amount
|
|
1815
|
-
|
|
1815
|
+
paymentDoneVC.cardApiParams = params
|
|
1816
1816
|
// if self.visibility?.billing == true {
|
|
1817
1817
|
paymentDoneVC.billingInfoData = self.billingInfo
|
|
1818
1818
|
var billingDict: [String: Any] = [:]
|
|
@@ -9134,6 +9134,7 @@ class PaymentInfoVC: BaseVC, BillingInfoVCDelegate {
|
|
|
9134
9134
|
paymentDoneVC.chargeData = responseObject
|
|
9135
9135
|
paymentDoneVC.easyPayDelegate = self.easyPayDelegate
|
|
9136
9136
|
paymentDoneVC.amount = self.amount
|
|
9137
|
+
paymentDoneVC.cardApiParams = params
|
|
9137
9138
|
// Pass billing info and additional info if available
|
|
9138
9139
|
if let billingInfoData = self.request.billingInfoData,
|
|
9139
9140
|
let fieldSection = try? JSONDecoder().decode(FieldSection.self, from: billingInfoData) {
|
|
@@ -9424,6 +9425,7 @@ class PaymentInfoVC: BaseVC, BillingInfoVCDelegate {
|
|
|
9424
9425
|
paymentDoneVC.chargeData = responseObject
|
|
9425
9426
|
paymentDoneVC.easyPayDelegate = self.easyPayDelegate
|
|
9426
9427
|
paymentDoneVC.amount = self.amount
|
|
9428
|
+
paymentDoneVC.cardApiParams = params
|
|
9427
9429
|
// Pass billing info and additional info if available
|
|
9428
9430
|
if let billingInfoData = self.request.billingInfoData,
|
|
9429
9431
|
let fieldSection = try? JSONDecoder().decode(FieldSection.self, from: billingInfoData) {
|
|
@@ -60,6 +60,8 @@ class ThreeDSecurePaymentDoneVC: BaseVC {
|
|
|
60
60
|
|
|
61
61
|
var amount: Int?
|
|
62
62
|
|
|
63
|
+
var cardApiParams: [String: Any]?
|
|
64
|
+
|
|
63
65
|
override func viewDidLoad() {
|
|
64
66
|
super.viewDidLoad()
|
|
65
67
|
uiFinishingTouchElements()
|
|
@@ -174,7 +176,7 @@ class ThreeDSecurePaymentDoneVC: BaseVC {
|
|
|
174
176
|
if !images.isEmpty {
|
|
175
177
|
let animatedImage = UIImage.animatedImage(with: images, duration: duration)
|
|
176
178
|
imgViewLoading.image = animatedImage
|
|
177
|
-
imgViewLoading.contentMode = .
|
|
179
|
+
imgViewLoading.contentMode = .scaleToFill
|
|
178
180
|
}
|
|
179
181
|
}
|
|
180
182
|
|
|
@@ -297,36 +299,44 @@ class ThreeDSecurePaymentDoneVC: BaseVC {
|
|
|
297
299
|
self.checkThreeDSecureStatus(completion: nil)
|
|
298
300
|
}
|
|
299
301
|
}
|
|
300
|
-
|
|
302
|
+
|
|
301
303
|
@IBAction func actionBtnDone(_ sender: UIButton) {
|
|
302
304
|
var resultBillingInfo: [String: Any]? = nil
|
|
303
305
|
var resultAdditionalInfo: [String: Any]? = nil
|
|
304
|
-
|
|
305
|
-
//
|
|
306
|
+
|
|
307
|
+
// Extract last 4 digits and format as ****4242
|
|
308
|
+
if let cardNumber = cardApiParams?["card_number"] as? String, cardNumber.count >= 4 {
|
|
309
|
+
let last4 = String(cardNumber.suffix(4))
|
|
310
|
+
let masked = "****\(last4)"
|
|
311
|
+
chargeData["card_number_last_4"] = masked
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
// Assign billing info if non-empty
|
|
306
315
|
if let billing = billingInfo, !billing.isEmpty {
|
|
307
316
|
resultBillingInfo = billing
|
|
308
317
|
}
|
|
309
|
-
|
|
318
|
+
|
|
310
319
|
// Combine 3DS status into additionalInfo if needed
|
|
311
320
|
var combinedAdditionalInfo = additionalInfo ?? [:]
|
|
312
321
|
if let threeDS = threeDSecureStatusResponse {
|
|
313
322
|
combinedAdditionalInfo["threeDSecureStatus"] = threeDS
|
|
314
323
|
}
|
|
315
|
-
|
|
316
|
-
// Only assign additionalInfo if it contains at least one non-empty key-value pair
|
|
324
|
+
|
|
317
325
|
if !combinedAdditionalInfo.isEmpty {
|
|
318
326
|
resultAdditionalInfo = combinedAdditionalInfo
|
|
319
327
|
}
|
|
320
|
-
|
|
328
|
+
|
|
329
|
+
//Pass updated chargeData with masked_card_number
|
|
321
330
|
let result = SDKResult(
|
|
322
331
|
type: .success,
|
|
323
332
|
chargeData: chargeData,
|
|
324
333
|
billingInfo: resultBillingInfo,
|
|
325
334
|
additionalInfo: resultAdditionalInfo
|
|
326
335
|
)
|
|
327
|
-
|
|
336
|
+
|
|
337
|
+
// Notify delegate and dismiss
|
|
328
338
|
easyPayDelegate?.easyPayController(self.navigationController as! EasyPayViewController, didFinishWith: result)
|
|
329
|
-
|
|
339
|
+
|
|
330
340
|
if let easyPayVC = self.navigationController as? EasyPayViewController {
|
|
331
341
|
easyPayVC.dismiss(animated: true, completion: {
|
|
332
342
|
if let delegate = easyPayVC.easyPayDelegate {
|