@jimrising/easymerchantsdk-react-native 2.3.3 → 2.3.5
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/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/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/build.gradle +1 -1
- package/ios/ApiManager/APIRequest.swift +1 -4
- package/ios/Bundle/EasyPayBundle.swift +1 -1
- package/ios/Classes/EasyMerchantSdk.m +2 -2
- package/ios/Classes/EasyMerchantSdk.swift +3 -3
- package/ios/CustomComponents/PlanSelector.swift +1 -1
- package/ios/Example/Base.lproj/Main.storyboard +183 -22
- package/ios/Example/ViewController.swift +208 -182
- package/ios/Helper/GrailPayHelper.swift +0 -1
- package/ios/Models/Request.swift +242 -51
- package/ios/Models/SDKResult.swift +32 -25
- package/ios/Pods/UserDefaults/UserStoreSingleton.swift +59 -60
- package/ios/Pods/ViewControllers/AdditionalInfoVC.swift +360 -150
- package/ios/Pods/ViewControllers/BaseVC.swift +2 -1
- package/ios/Pods/ViewControllers/BillingInfoVC/BillingInfoVC.swift +401 -196
- package/ios/Pods/ViewControllers/Clean Runner_2025-07-23T14-58-05.txt +13 -0
- package/ios/Pods/ViewControllers/EmailVerificationVC.swift +0 -7
- package/ios/Pods/ViewControllers/GrailPayVC.swift +11 -3
- package/ios/Pods/ViewControllers/OTPVerificationVC.swift +252 -105
- package/ios/Pods/ViewControllers/PaymentDoneVC.swift +20 -5
- package/ios/Pods/ViewControllers/PaymentErrorVC.swift +2 -2
- package/ios/Pods/ViewControllers/PaymentInformation/PaymentInfoVC.swift +804 -347
- package/ios/Pods/ViewControllers/PaymentInformation/SavedAccountsTVC/SavedAccountTVC.swift +0 -1
- package/ios/Pods/ViewControllers/PaymentStatusWebViewVC.swift +1 -1
- package/ios/Pods/ViewControllers/ThreeDSecurePaymentDoneVC.swift +68 -66
- package/ios/Resources/Assets.xcassets/payment_done_icon.imageset/Contents.json +3 -0
- package/ios/easymerchantsdk.podspec +1 -1
- package/package.json +1 -1
- package/ios/CustomComponents/CheckboxButton.swift +0 -66
- package/ios/Models/AdditionalInfo.swift +0 -53
- package/ios/Models/BillingInfo.swift +0 -60
- package/ios/Pods/ViewControllers/CustomOverlay.swift +0 -199
- package/ios/Resources/Assets.xcassets/Card/Amex.imageset/206682_american_express_method_card_payment_icon.svg +0 -1
- package/ios/Resources/Assets.xcassets/Card/Amex.imageset/Contents.json +0 -12
- package/ios/Resources/Assets.xcassets/Card/Contents.json +0 -6
- package/ios/Resources/Assets.xcassets/Card/DinersClub.imageset/472318_card_club_diners_dinner_payment_icon.svg +0 -1
- package/ios/Resources/Assets.xcassets/Card/DinersClub.imageset/Contents.json +0 -12
- package/ios/Resources/Assets.xcassets/Card/Discover.imageset/206686_network_payment_discover_card_method_icon.svg +0 -1
- package/ios/Resources/Assets.xcassets/Card/Discover.imageset/Contents.json +0 -12
- package/ios/Resources/Assets.xcassets/Card/JCB.imageset/358102_card_jcb_payment_icon.svg +0 -1
- package/ios/Resources/Assets.xcassets/Card/JCB.imageset/Contents.json +0 -12
- package/ios/Resources/Assets.xcassets/Card/MasterCard.imageset/206680_master_method_card_payment_icon.svg +0 -1
- package/ios/Resources/Assets.xcassets/Card/MasterCard.imageset/Contents.json +0 -12
- package/ios/Resources/Assets.xcassets/Card/UnionPay.imageset/1468976_card_payment_unionpay_icon.svg +0 -1
- package/ios/Resources/Assets.xcassets/Card/UnionPay.imageset/Contents.json +0 -12
- package/ios/Resources/Assets.xcassets/Card/Visa.imageset/206684_visa_method_card_payment_icon.svg +0 -1
- package/ios/Resources/Assets.xcassets/Card/Visa.imageset/Contents.json +0 -12
- package/ios/Resources/Assets.xcassets/Card/maestro.imageset/Contents.json +0 -12
- package/ios/Resources/Assets.xcassets/Card/maestro.imageset/maestro.svg +0 -1
- package/ios/Resources/Assets.xcassets/Card/paypal.imageset/206675_paypal_method_payment_icon.svg +0 -1
- package/ios/Resources/Assets.xcassets/Card/paypal.imageset/Contents.json +0 -12
- package/ios/Resources/Assets.xcassets/Card/rupay.imageset/Contents.json +0 -12
- package/ios/Resources/Assets.xcassets/Card/rupay.imageset/rupay.svg +0 -1
- package/ios/Resources/Assets.xcassets/Card/unknown_card.imageset/4635000_card_credit_digital_money_icon.svg +0 -1
- package/ios/Resources/Assets.xcassets/Card/unknown_card.imageset/Contents.json +0 -12
- package/ios/Resources/Assets.xcassets/Card/worldpay.imageset/Contents.json +0 -12
- package/ios/Resources/Assets.xcassets/Card/worldpay.imageset/worldpay.svg +0 -1
|
@@ -576,26 +576,47 @@ class AdditionalInfoVC: BaseVC {
|
|
|
576
576
|
params["phone_number"] = localPhone
|
|
577
577
|
}
|
|
578
578
|
|
|
579
|
+
// Add these if recurring is enabled
|
|
580
|
+
// if let req = request, req.is_recurring == true {
|
|
581
|
+
// if let recurringType = req.recurringStartDateType, recurringType == .custom {
|
|
582
|
+
// // Only send start_date if type is .custom and field is not empty
|
|
583
|
+
// if let startDateText = startDate, !startDateText.isEmpty {
|
|
584
|
+
// let inputFormatter = DateFormatter()
|
|
585
|
+
// inputFormatter.dateFormat = "dd/MM/yyyy"
|
|
586
|
+
//
|
|
587
|
+
// let outputFormatter = DateFormatter()
|
|
588
|
+
// outputFormatter.dateFormat = "MM/dd/yyyy"
|
|
589
|
+
//
|
|
590
|
+
// if let date = inputFormatter.date(from: startDateText) {
|
|
591
|
+
// let apiFormattedDate = outputFormatter.string(from: date)
|
|
592
|
+
// params["start_date"] = apiFormattedDate
|
|
593
|
+
// } else {
|
|
594
|
+
// print("Invalid date format in startDateText")
|
|
595
|
+
// }
|
|
596
|
+
// }
|
|
597
|
+
// }
|
|
598
|
+
//
|
|
599
|
+
// params["interval"] = chosenPlan?.lowercased()
|
|
600
|
+
// }
|
|
601
|
+
|
|
579
602
|
// Add these if recurring is enabled
|
|
580
603
|
if let req = request, req.is_recurring == true {
|
|
581
|
-
if let
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
} else {
|
|
594
|
-
print("Invalid date format in startDateText")
|
|
595
|
-
}
|
|
604
|
+
if let startDateText = startDate, !startDateText.isEmpty {
|
|
605
|
+
let inputFormatter = DateFormatter()
|
|
606
|
+
inputFormatter.dateFormat = "dd/MM/yyyy"
|
|
607
|
+
|
|
608
|
+
let outputFormatter = DateFormatter()
|
|
609
|
+
outputFormatter.dateFormat = "MM/dd/yyyy"
|
|
610
|
+
|
|
611
|
+
if let date = inputFormatter.date(from: startDateText) {
|
|
612
|
+
let apiFormattedDate = outputFormatter.string(from: date)
|
|
613
|
+
params["start_date"] = apiFormattedDate
|
|
614
|
+
} else {
|
|
615
|
+
print("Invalid date format in startDateText")
|
|
596
616
|
}
|
|
597
617
|
}
|
|
598
618
|
|
|
619
|
+
// interval is still required
|
|
599
620
|
params["interval"] = chosenPlan?.lowercased()
|
|
600
621
|
}
|
|
601
622
|
|
|
@@ -794,26 +815,47 @@ class AdditionalInfoVC: BaseVC {
|
|
|
794
815
|
params["description"] = defaultDescription
|
|
795
816
|
}
|
|
796
817
|
|
|
818
|
+
// Add these if recurring is enabled
|
|
819
|
+
// if let req = request, req.is_recurring == true {
|
|
820
|
+
// if let recurringType = req.recurringStartDateType, recurringType == .custom {
|
|
821
|
+
// // Only send start_date if type is .custom and field is not empty
|
|
822
|
+
// if let startDateText = startDate, !startDateText.isEmpty {
|
|
823
|
+
// let inputFormatter = DateFormatter()
|
|
824
|
+
// inputFormatter.dateFormat = "dd/MM/yyyy"
|
|
825
|
+
//
|
|
826
|
+
// let outputFormatter = DateFormatter()
|
|
827
|
+
// outputFormatter.dateFormat = "MM/dd/yyyy"
|
|
828
|
+
//
|
|
829
|
+
// if let date = inputFormatter.date(from: startDateText) {
|
|
830
|
+
// let apiFormattedDate = outputFormatter.string(from: date)
|
|
831
|
+
// params["start_date"] = apiFormattedDate
|
|
832
|
+
// } else {
|
|
833
|
+
// print("Invalid date format in startDateText")
|
|
834
|
+
// }
|
|
835
|
+
// }
|
|
836
|
+
// }
|
|
837
|
+
//
|
|
838
|
+
// params["interval"] = chosenPlan?.lowercased()
|
|
839
|
+
// }
|
|
840
|
+
|
|
797
841
|
// Add these if recurring is enabled
|
|
798
842
|
if let req = request, req.is_recurring == true {
|
|
799
|
-
if let
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
} else {
|
|
812
|
-
print("Invalid date format in startDateText")
|
|
813
|
-
}
|
|
843
|
+
if let startDateText = startDate, !startDateText.isEmpty {
|
|
844
|
+
let inputFormatter = DateFormatter()
|
|
845
|
+
inputFormatter.dateFormat = "dd/MM/yyyy"
|
|
846
|
+
|
|
847
|
+
let outputFormatter = DateFormatter()
|
|
848
|
+
outputFormatter.dateFormat = "MM/dd/yyyy"
|
|
849
|
+
|
|
850
|
+
if let date = inputFormatter.date(from: startDateText) {
|
|
851
|
+
let apiFormattedDate = outputFormatter.string(from: date)
|
|
852
|
+
params["start_date"] = apiFormattedDate
|
|
853
|
+
} else {
|
|
854
|
+
print("Invalid date format in startDateText")
|
|
814
855
|
}
|
|
815
856
|
}
|
|
816
857
|
|
|
858
|
+
// interval is still required
|
|
817
859
|
params["interval"] = chosenPlan?.lowercased()
|
|
818
860
|
}
|
|
819
861
|
|
|
@@ -988,26 +1030,47 @@ class AdditionalInfoVC: BaseVC {
|
|
|
988
1030
|
params["phone_number"] = localPhone
|
|
989
1031
|
}
|
|
990
1032
|
|
|
1033
|
+
// Add these if recurring is enabled
|
|
1034
|
+
// if let req = request, req.is_recurring == true {
|
|
1035
|
+
// if let recurringType = req.recurringStartDateType, recurringType == .custom {
|
|
1036
|
+
// // Only send start_date if type is .custom and field is not empty
|
|
1037
|
+
// if let startDateText = startDate, !startDateText.isEmpty {
|
|
1038
|
+
// let inputFormatter = DateFormatter()
|
|
1039
|
+
// inputFormatter.dateFormat = "dd/MM/yyyy"
|
|
1040
|
+
//
|
|
1041
|
+
// let outputFormatter = DateFormatter()
|
|
1042
|
+
// outputFormatter.dateFormat = "MM/dd/yyyy"
|
|
1043
|
+
//
|
|
1044
|
+
// if let date = inputFormatter.date(from: startDateText) {
|
|
1045
|
+
// let apiFormattedDate = outputFormatter.string(from: date)
|
|
1046
|
+
// params["start_date"] = apiFormattedDate
|
|
1047
|
+
// } else {
|
|
1048
|
+
// print("Invalid date format in startDateText")
|
|
1049
|
+
// }
|
|
1050
|
+
// }
|
|
1051
|
+
// }
|
|
1052
|
+
//
|
|
1053
|
+
// params["interval"] = chosenPlan?.lowercased()
|
|
1054
|
+
// }
|
|
1055
|
+
|
|
991
1056
|
// Add these if recurring is enabled
|
|
992
1057
|
if let req = request, req.is_recurring == true {
|
|
993
|
-
if let
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
} else {
|
|
1006
|
-
print("Invalid date format in startDateText")
|
|
1007
|
-
}
|
|
1058
|
+
if let startDateText = startDate, !startDateText.isEmpty {
|
|
1059
|
+
let inputFormatter = DateFormatter()
|
|
1060
|
+
inputFormatter.dateFormat = "dd/MM/yyyy"
|
|
1061
|
+
|
|
1062
|
+
let outputFormatter = DateFormatter()
|
|
1063
|
+
outputFormatter.dateFormat = "MM/dd/yyyy"
|
|
1064
|
+
|
|
1065
|
+
if let date = inputFormatter.date(from: startDateText) {
|
|
1066
|
+
let apiFormattedDate = outputFormatter.string(from: date)
|
|
1067
|
+
params["start_date"] = apiFormattedDate
|
|
1068
|
+
} else {
|
|
1069
|
+
print("Invalid date format in startDateText")
|
|
1008
1070
|
}
|
|
1009
1071
|
}
|
|
1010
1072
|
|
|
1073
|
+
// interval is still required
|
|
1011
1074
|
params["interval"] = chosenPlan?.lowercased()
|
|
1012
1075
|
}
|
|
1013
1076
|
|
|
@@ -1205,26 +1268,47 @@ class AdditionalInfoVC: BaseVC {
|
|
|
1205
1268
|
params["phone_number"] = localPhone
|
|
1206
1269
|
}
|
|
1207
1270
|
|
|
1271
|
+
// Add these if recurring is enabled
|
|
1272
|
+
// if let req = request, req.is_recurring == true {
|
|
1273
|
+
// if let recurringType = req.recurringStartDateType, recurringType == .custom {
|
|
1274
|
+
// // Only send start_date if type is .custom and field is not empty
|
|
1275
|
+
// if let startDateText = startDate, !startDateText.isEmpty {
|
|
1276
|
+
// let inputFormatter = DateFormatter()
|
|
1277
|
+
// inputFormatter.dateFormat = "dd/MM/yyyy"
|
|
1278
|
+
//
|
|
1279
|
+
// let outputFormatter = DateFormatter()
|
|
1280
|
+
// outputFormatter.dateFormat = "MM/dd/yyyy"
|
|
1281
|
+
//
|
|
1282
|
+
// if let date = inputFormatter.date(from: startDateText) {
|
|
1283
|
+
// let apiFormattedDate = outputFormatter.string(from: date)
|
|
1284
|
+
// params["start_date"] = apiFormattedDate
|
|
1285
|
+
// } else {
|
|
1286
|
+
// print("Invalid date format in startDateText")
|
|
1287
|
+
// }
|
|
1288
|
+
// }
|
|
1289
|
+
// }
|
|
1290
|
+
//
|
|
1291
|
+
// params["interval"] = chosenPlan?.lowercased()
|
|
1292
|
+
// }
|
|
1293
|
+
|
|
1208
1294
|
// Add these if recurring is enabled
|
|
1209
1295
|
if let req = request, req.is_recurring == true {
|
|
1210
|
-
if let
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
} else {
|
|
1223
|
-
print("Invalid date format in startDateText")
|
|
1224
|
-
}
|
|
1296
|
+
if let startDateText = startDate, !startDateText.isEmpty {
|
|
1297
|
+
let inputFormatter = DateFormatter()
|
|
1298
|
+
inputFormatter.dateFormat = "dd/MM/yyyy"
|
|
1299
|
+
|
|
1300
|
+
let outputFormatter = DateFormatter()
|
|
1301
|
+
outputFormatter.dateFormat = "MM/dd/yyyy"
|
|
1302
|
+
|
|
1303
|
+
if let date = inputFormatter.date(from: startDateText) {
|
|
1304
|
+
let apiFormattedDate = outputFormatter.string(from: date)
|
|
1305
|
+
params["start_date"] = apiFormattedDate
|
|
1306
|
+
} else {
|
|
1307
|
+
print("Invalid date format in startDateText")
|
|
1225
1308
|
}
|
|
1226
1309
|
}
|
|
1227
1310
|
|
|
1311
|
+
// interval is still required
|
|
1228
1312
|
params["interval"] = chosenPlan?.lowercased()
|
|
1229
1313
|
}
|
|
1230
1314
|
|
|
@@ -1402,26 +1486,47 @@ class AdditionalInfoVC: BaseVC {
|
|
|
1402
1486
|
params["phone_number"] = localPhone
|
|
1403
1487
|
}
|
|
1404
1488
|
|
|
1489
|
+
// Add these if recurring is enabled
|
|
1490
|
+
// if let req = request, req.is_recurring == true {
|
|
1491
|
+
// if let recurringType = req.recurringStartDateType, recurringType == .custom {
|
|
1492
|
+
// // Only send start_date if type is .custom and field is not empty
|
|
1493
|
+
// if let startDateText = startDate, !startDateText.isEmpty {
|
|
1494
|
+
// let inputFormatter = DateFormatter()
|
|
1495
|
+
// inputFormatter.dateFormat = "dd/MM/yyyy"
|
|
1496
|
+
//
|
|
1497
|
+
// let outputFormatter = DateFormatter()
|
|
1498
|
+
// outputFormatter.dateFormat = "MM/dd/yyyy"
|
|
1499
|
+
//
|
|
1500
|
+
// if let date = inputFormatter.date(from: startDateText) {
|
|
1501
|
+
// let apiFormattedDate = outputFormatter.string(from: date)
|
|
1502
|
+
// params["start_date"] = apiFormattedDate
|
|
1503
|
+
// } else {
|
|
1504
|
+
// print("Invalid date format in startDateText")
|
|
1505
|
+
// }
|
|
1506
|
+
// }
|
|
1507
|
+
// }
|
|
1508
|
+
//
|
|
1509
|
+
// params["interval"] = chosenPlan?.lowercased()
|
|
1510
|
+
// }
|
|
1511
|
+
|
|
1405
1512
|
// Add these if recurring is enabled
|
|
1406
1513
|
if let req = request, req.is_recurring == true {
|
|
1407
|
-
if let
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
} else {
|
|
1420
|
-
print("Invalid date format in startDateText")
|
|
1421
|
-
}
|
|
1514
|
+
if let startDateText = startDate, !startDateText.isEmpty {
|
|
1515
|
+
let inputFormatter = DateFormatter()
|
|
1516
|
+
inputFormatter.dateFormat = "dd/MM/yyyy"
|
|
1517
|
+
|
|
1518
|
+
let outputFormatter = DateFormatter()
|
|
1519
|
+
outputFormatter.dateFormat = "MM/dd/yyyy"
|
|
1520
|
+
|
|
1521
|
+
if let date = inputFormatter.date(from: startDateText) {
|
|
1522
|
+
let apiFormattedDate = outputFormatter.string(from: date)
|
|
1523
|
+
params["start_date"] = apiFormattedDate
|
|
1524
|
+
} else {
|
|
1525
|
+
print("Invalid date format in startDateText")
|
|
1422
1526
|
}
|
|
1423
1527
|
}
|
|
1424
1528
|
|
|
1529
|
+
// interval is still required
|
|
1425
1530
|
params["interval"] = chosenPlan?.lowercased()
|
|
1426
1531
|
}
|
|
1427
1532
|
|
|
@@ -1606,26 +1711,47 @@ class AdditionalInfoVC: BaseVC {
|
|
|
1606
1711
|
params["phone_number"] = localPhone
|
|
1607
1712
|
}
|
|
1608
1713
|
|
|
1714
|
+
// Add these if recurring is enabled
|
|
1715
|
+
// if let req = request, req.is_recurring == true {
|
|
1716
|
+
// if let recurringType = req.recurringStartDateType, recurringType == .custom {
|
|
1717
|
+
// // Only send start_date if type is .custom and field is not empty
|
|
1718
|
+
// if let startDateText = startDate, !startDateText.isEmpty {
|
|
1719
|
+
// let inputFormatter = DateFormatter()
|
|
1720
|
+
// inputFormatter.dateFormat = "dd/MM/yyyy"
|
|
1721
|
+
//
|
|
1722
|
+
// let outputFormatter = DateFormatter()
|
|
1723
|
+
// outputFormatter.dateFormat = "MM/dd/yyyy"
|
|
1724
|
+
//
|
|
1725
|
+
// if let date = inputFormatter.date(from: startDateText) {
|
|
1726
|
+
// let apiFormattedDate = outputFormatter.string(from: date)
|
|
1727
|
+
// params["start_date"] = apiFormattedDate
|
|
1728
|
+
// } else {
|
|
1729
|
+
// print("Invalid date format in startDateText")
|
|
1730
|
+
// }
|
|
1731
|
+
// }
|
|
1732
|
+
// }
|
|
1733
|
+
//
|
|
1734
|
+
// params["interval"] = chosenPlan?.lowercased()
|
|
1735
|
+
// }
|
|
1736
|
+
|
|
1609
1737
|
// Add these if recurring is enabled
|
|
1610
1738
|
if let req = request, req.is_recurring == true {
|
|
1611
|
-
if let
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
} else {
|
|
1624
|
-
print("Invalid date format in startDateText")
|
|
1625
|
-
}
|
|
1739
|
+
if let startDateText = startDate, !startDateText.isEmpty {
|
|
1740
|
+
let inputFormatter = DateFormatter()
|
|
1741
|
+
inputFormatter.dateFormat = "dd/MM/yyyy"
|
|
1742
|
+
|
|
1743
|
+
let outputFormatter = DateFormatter()
|
|
1744
|
+
outputFormatter.dateFormat = "MM/dd/yyyy"
|
|
1745
|
+
|
|
1746
|
+
if let date = inputFormatter.date(from: startDateText) {
|
|
1747
|
+
let apiFormattedDate = outputFormatter.string(from: date)
|
|
1748
|
+
params["start_date"] = apiFormattedDate
|
|
1749
|
+
} else {
|
|
1750
|
+
print("Invalid date format in startDateText")
|
|
1626
1751
|
}
|
|
1627
1752
|
}
|
|
1628
1753
|
|
|
1754
|
+
// interval is still required
|
|
1629
1755
|
params["interval"] = chosenPlan?.lowercased()
|
|
1630
1756
|
}
|
|
1631
1757
|
|
|
@@ -1817,26 +1943,47 @@ class AdditionalInfoVC: BaseVC {
|
|
|
1817
1943
|
params["phone_number"] = localPhone
|
|
1818
1944
|
}
|
|
1819
1945
|
|
|
1946
|
+
// Add these if recurring is enabled
|
|
1947
|
+
// if let req = request, req.is_recurring == true {
|
|
1948
|
+
// if let recurringType = req.recurringStartDateType, recurringType == .custom {
|
|
1949
|
+
// // Only send start_date if type is .custom and field is not empty
|
|
1950
|
+
// if let startDateText = startDate, !startDateText.isEmpty {
|
|
1951
|
+
// let inputFormatter = DateFormatter()
|
|
1952
|
+
// inputFormatter.dateFormat = "dd/MM/yyyy"
|
|
1953
|
+
//
|
|
1954
|
+
// let outputFormatter = DateFormatter()
|
|
1955
|
+
// outputFormatter.dateFormat = "MM/dd/yyyy"
|
|
1956
|
+
//
|
|
1957
|
+
// if let date = inputFormatter.date(from: startDateText) {
|
|
1958
|
+
// let apiFormattedDate = outputFormatter.string(from: date)
|
|
1959
|
+
// params["start_date"] = apiFormattedDate
|
|
1960
|
+
// } else {
|
|
1961
|
+
// print("Invalid date format in startDateText")
|
|
1962
|
+
// }
|
|
1963
|
+
// }
|
|
1964
|
+
// }
|
|
1965
|
+
//
|
|
1966
|
+
// params["interval"] = chosenPlan?.lowercased()
|
|
1967
|
+
// }
|
|
1968
|
+
|
|
1820
1969
|
// Add these if recurring is enabled
|
|
1821
1970
|
if let req = request, req.is_recurring == true {
|
|
1822
|
-
if let
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
} else {
|
|
1835
|
-
print("Invalid date format in startDateText")
|
|
1836
|
-
}
|
|
1971
|
+
if let startDateText = startDate, !startDateText.isEmpty {
|
|
1972
|
+
let inputFormatter = DateFormatter()
|
|
1973
|
+
inputFormatter.dateFormat = "dd/MM/yyyy"
|
|
1974
|
+
|
|
1975
|
+
let outputFormatter = DateFormatter()
|
|
1976
|
+
outputFormatter.dateFormat = "MM/dd/yyyy"
|
|
1977
|
+
|
|
1978
|
+
if let date = inputFormatter.date(from: startDateText) {
|
|
1979
|
+
let apiFormattedDate = outputFormatter.string(from: date)
|
|
1980
|
+
params["start_date"] = apiFormattedDate
|
|
1981
|
+
} else {
|
|
1982
|
+
print("Invalid date format in startDateText")
|
|
1837
1983
|
}
|
|
1838
1984
|
}
|
|
1839
1985
|
|
|
1986
|
+
// interval is still required
|
|
1840
1987
|
params["interval"] = chosenPlan?.lowercased()
|
|
1841
1988
|
}
|
|
1842
1989
|
|
|
@@ -2016,26 +2163,47 @@ class AdditionalInfoVC: BaseVC {
|
|
|
2016
2163
|
params["phone_number"] = localPhone
|
|
2017
2164
|
}
|
|
2018
2165
|
|
|
2166
|
+
// Add these if recurring is enabled
|
|
2167
|
+
// if let req = request, req.is_recurring == true {
|
|
2168
|
+
// if let recurringType = req.recurringStartDateType, recurringType == .custom {
|
|
2169
|
+
// // Only send start_date if type is .custom and field is not empty
|
|
2170
|
+
// if let startDateText = startDate, !startDateText.isEmpty {
|
|
2171
|
+
// let inputFormatter = DateFormatter()
|
|
2172
|
+
// inputFormatter.dateFormat = "dd/MM/yyyy"
|
|
2173
|
+
//
|
|
2174
|
+
// let outputFormatter = DateFormatter()
|
|
2175
|
+
// outputFormatter.dateFormat = "MM/dd/yyyy"
|
|
2176
|
+
//
|
|
2177
|
+
// if let date = inputFormatter.date(from: startDateText) {
|
|
2178
|
+
// let apiFormattedDate = outputFormatter.string(from: date)
|
|
2179
|
+
// params["start_date"] = apiFormattedDate
|
|
2180
|
+
// } else {
|
|
2181
|
+
// print("Invalid date format in startDateText")
|
|
2182
|
+
// }
|
|
2183
|
+
// }
|
|
2184
|
+
// }
|
|
2185
|
+
//
|
|
2186
|
+
// params["interval"] = chosenPlan?.lowercased()
|
|
2187
|
+
// }
|
|
2188
|
+
|
|
2019
2189
|
// Add these if recurring is enabled
|
|
2020
2190
|
if let req = request, req.is_recurring == true {
|
|
2021
|
-
if let
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
} else {
|
|
2034
|
-
print("Invalid date format in startDateText")
|
|
2035
|
-
}
|
|
2191
|
+
if let startDateText = startDate, !startDateText.isEmpty {
|
|
2192
|
+
let inputFormatter = DateFormatter()
|
|
2193
|
+
inputFormatter.dateFormat = "dd/MM/yyyy"
|
|
2194
|
+
|
|
2195
|
+
let outputFormatter = DateFormatter()
|
|
2196
|
+
outputFormatter.dateFormat = "MM/dd/yyyy"
|
|
2197
|
+
|
|
2198
|
+
if let date = inputFormatter.date(from: startDateText) {
|
|
2199
|
+
let apiFormattedDate = outputFormatter.string(from: date)
|
|
2200
|
+
params["start_date"] = apiFormattedDate
|
|
2201
|
+
} else {
|
|
2202
|
+
print("Invalid date format in startDateText")
|
|
2036
2203
|
}
|
|
2037
2204
|
}
|
|
2038
2205
|
|
|
2206
|
+
// interval is still required
|
|
2039
2207
|
params["interval"] = chosenPlan?.lowercased()
|
|
2040
2208
|
}
|
|
2041
2209
|
|
|
@@ -2233,26 +2401,47 @@ class AdditionalInfoVC: BaseVC {
|
|
|
2233
2401
|
}
|
|
2234
2402
|
params["description"] = descriptionValue
|
|
2235
2403
|
|
|
2404
|
+
// Add these if recurring is enabled
|
|
2405
|
+
// if let req = request, req.is_recurring == true {
|
|
2406
|
+
// if let recurringType = req.recurringStartDateType, recurringType == .custom {
|
|
2407
|
+
// // Only send start_date if type is .custom and field is not empty
|
|
2408
|
+
// if let startDateText = startDate, !startDateText.isEmpty {
|
|
2409
|
+
// let inputFormatter = DateFormatter()
|
|
2410
|
+
// inputFormatter.dateFormat = "dd/MM/yyyy"
|
|
2411
|
+
//
|
|
2412
|
+
// let outputFormatter = DateFormatter()
|
|
2413
|
+
// outputFormatter.dateFormat = "MM/dd/yyyy"
|
|
2414
|
+
//
|
|
2415
|
+
// if let date = inputFormatter.date(from: startDateText) {
|
|
2416
|
+
// let apiFormattedDate = outputFormatter.string(from: date)
|
|
2417
|
+
// params["start_date"] = apiFormattedDate
|
|
2418
|
+
// } else {
|
|
2419
|
+
// print("Invalid date format in startDateText")
|
|
2420
|
+
// }
|
|
2421
|
+
// }
|
|
2422
|
+
// }
|
|
2423
|
+
//
|
|
2424
|
+
// params["interval"] = chosenPlan?.lowercased()
|
|
2425
|
+
// }
|
|
2426
|
+
|
|
2236
2427
|
// Add these if recurring is enabled
|
|
2237
2428
|
if let req = request, req.is_recurring == true {
|
|
2238
|
-
if let
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
} else {
|
|
2251
|
-
print("Invalid date format in startDateText")
|
|
2252
|
-
}
|
|
2429
|
+
if let startDateText = startDate, !startDateText.isEmpty {
|
|
2430
|
+
let inputFormatter = DateFormatter()
|
|
2431
|
+
inputFormatter.dateFormat = "dd/MM/yyyy"
|
|
2432
|
+
|
|
2433
|
+
let outputFormatter = DateFormatter()
|
|
2434
|
+
outputFormatter.dateFormat = "MM/dd/yyyy"
|
|
2435
|
+
|
|
2436
|
+
if let date = inputFormatter.date(from: startDateText) {
|
|
2437
|
+
let apiFormattedDate = outputFormatter.string(from: date)
|
|
2438
|
+
params["start_date"] = apiFormattedDate
|
|
2439
|
+
} else {
|
|
2440
|
+
print("Invalid date format in startDateText")
|
|
2253
2441
|
}
|
|
2254
2442
|
}
|
|
2255
2443
|
|
|
2444
|
+
// interval is still required
|
|
2256
2445
|
params["interval"] = chosenPlan?.lowercased()
|
|
2257
2446
|
}
|
|
2258
2447
|
|
|
@@ -2460,26 +2649,47 @@ class AdditionalInfoVC: BaseVC {
|
|
|
2460
2649
|
}
|
|
2461
2650
|
params["description"] = descriptionValue
|
|
2462
2651
|
|
|
2652
|
+
// Add these if recurring is enabled
|
|
2653
|
+
// if let req = request, req.is_recurring == true {
|
|
2654
|
+
// if let recurringType = req.recurringStartDateType, recurringType == .custom {
|
|
2655
|
+
// // Only send start_date if type is .custom and field is not empty
|
|
2656
|
+
// if let startDateText = startDate, !startDateText.isEmpty {
|
|
2657
|
+
// let inputFormatter = DateFormatter()
|
|
2658
|
+
// inputFormatter.dateFormat = "dd/MM/yyyy"
|
|
2659
|
+
//
|
|
2660
|
+
// let outputFormatter = DateFormatter()
|
|
2661
|
+
// outputFormatter.dateFormat = "MM/dd/yyyy"
|
|
2662
|
+
//
|
|
2663
|
+
// if let date = inputFormatter.date(from: startDateText) {
|
|
2664
|
+
// let apiFormattedDate = outputFormatter.string(from: date)
|
|
2665
|
+
// params["start_date"] = apiFormattedDate
|
|
2666
|
+
// } else {
|
|
2667
|
+
// print("Invalid date format in startDateText")
|
|
2668
|
+
// }
|
|
2669
|
+
// }
|
|
2670
|
+
// }
|
|
2671
|
+
//
|
|
2672
|
+
// params["interval"] = chosenPlan?.lowercased()
|
|
2673
|
+
// }
|
|
2674
|
+
|
|
2463
2675
|
// Add these if recurring is enabled
|
|
2464
2676
|
if let req = request, req.is_recurring == true {
|
|
2465
|
-
if let
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
} else {
|
|
2478
|
-
print("Invalid date format in startDateText")
|
|
2479
|
-
}
|
|
2677
|
+
if let startDateText = startDate, !startDateText.isEmpty {
|
|
2678
|
+
let inputFormatter = DateFormatter()
|
|
2679
|
+
inputFormatter.dateFormat = "dd/MM/yyyy"
|
|
2680
|
+
|
|
2681
|
+
let outputFormatter = DateFormatter()
|
|
2682
|
+
outputFormatter.dateFormat = "MM/dd/yyyy"
|
|
2683
|
+
|
|
2684
|
+
if let date = inputFormatter.date(from: startDateText) {
|
|
2685
|
+
let apiFormattedDate = outputFormatter.string(from: date)
|
|
2686
|
+
params["start_date"] = apiFormattedDate
|
|
2687
|
+
} else {
|
|
2688
|
+
print("Invalid date format in startDateText")
|
|
2480
2689
|
}
|
|
2481
2690
|
}
|
|
2482
2691
|
|
|
2692
|
+
// interval is still required
|
|
2483
2693
|
params["interval"] = chosenPlan?.lowercased()
|
|
2484
2694
|
}
|
|
2485
2695
|
|
|
@@ -112,7 +112,6 @@ class BaseVC: UIViewController {
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
-
|
|
116
115
|
|
|
117
116
|
func showAlert(title: String = "Alert", message: String, actionTitle: String = "OK", handler: ((UIAlertAction) -> Void)? = nil) {
|
|
118
117
|
DispatchQueue.main.async {
|
|
@@ -139,3 +138,5 @@ extension String {
|
|
|
139
138
|
|
|
140
139
|
|
|
141
140
|
|
|
141
|
+
|
|
142
|
+
|