@jimrising/easymerchantsdk-react-native 1.7.1 → 1.7.2

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 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.7.1"
10
+ "@jimrising/easymerchantsdk-react-native": "^1.7.2"
11
11
  },
12
12
  ```
13
13
 
@@ -227,9 +227,9 @@ public class EasyMerchantSdkPlugin: NSObject, RCTBridgeModule {
227
227
  showReceipt: showReceipt,
228
228
  showTotal: showTotal,
229
229
  showSubmitButton: showSubmitButton,
230
- isEmail : isEmail,
231
230
  referenceID: enable3DS,
232
231
  referenceToken: nil,
232
+ isEmail : isEmail,
233
233
  email:email,
234
234
  name: name
235
235
  )
@@ -6,7 +6,7 @@
6
6
  //
7
7
 
8
8
  import UIKit
9
- import BlinkCard
9
+ //import BlinkCard
10
10
 
11
11
  struct PaymentsData {
12
12
  var name = String()
@@ -366,7 +366,7 @@ class PaymentInfoVC: BaseVC, BillingInfoVCDelegate {
366
366
  var isFrom = String()
367
367
 
368
368
  //Blink Card
369
- var blinkCardRecognizer: MBCBlinkCardRecognizer!
369
+ // var blinkCardRecognizer: MBCBlinkCardRecognizer!
370
370
 
371
371
  // Variables for Card Scanning Data Back
372
372
  var cardNumber: String?
@@ -4874,38 +4874,38 @@ class PaymentInfoVC: BaseVC, BillingInfoVCDelegate {
4874
4874
 
4875
4875
  //MARK: - Card Scan Button Action
4876
4876
  @IBAction func actionButtonScanCard(_ sender: UIButton) {
4877
- // Validate BlinkCard License
4878
- let licenseErrorMessage = BlinkCardHelper.setupLicense()
4879
- if !licenseErrorMessage.isEmpty {
4880
- // Show alert if the license is invalid or expired
4881
- showLicenseErrorAlert(message: licenseErrorMessage)
4882
- return
4883
- }
4884
-
4885
- // Proceed with card scanning if the license is valid
4886
- blinkCardRecognizer = MBCBlinkCardRecognizer()
4887
- blinkCardRecognizer.returnFullDocumentImage = true
4888
-
4889
- let recognizerList = [blinkCardRecognizer!]
4890
- let recognizerCollection = MBCRecognizerCollection(recognizers: recognizerList)
4891
-
4892
- let customOverlayViewController: CustomOverlay = CustomOverlay.initFromStoryboard()
4893
-
4894
- // Reconfigure recognizers with the overlay
4895
- customOverlayViewController.reconfigureRecognizers(recognizerCollection)
4896
-
4897
- // Create the recognizer runner view controller with custom overlay
4898
- guard let recognizerRunnerViewController =
4899
- MBCViewControllerFactory.recognizerRunnerViewController(withOverlayViewController: customOverlayViewController) else {
4900
- showLicenseErrorAlert(message: "Failed to initialize the recognizer view controller.")
4901
- return
4902
- }
4903
-
4904
- customOverlayViewController.delegate = self
4905
- recognizerRunnerViewController.modalPresentationStyle = .fullScreen
4906
-
4907
- // Present the recognizer runner view controller
4908
- self.present(recognizerRunnerViewController, animated: true, completion: nil)
4877
+ // // Validate BlinkCard License
4878
+ // let licenseErrorMessage = BlinkCardHelper.setupLicense()
4879
+ // if !licenseErrorMessage.isEmpty {
4880
+ // // Show alert if the license is invalid or expired
4881
+ // showLicenseErrorAlert(message: licenseErrorMessage)
4882
+ // return
4883
+ // }
4884
+ //
4885
+ // // Proceed with card scanning if the license is valid
4886
+ // blinkCardRecognizer = MBCBlinkCardRecognizer()
4887
+ // blinkCardRecognizer.returnFullDocumentImage = true
4888
+ //
4889
+ // let recognizerList = [blinkCardRecognizer!]
4890
+ // let recognizerCollection = MBCRecognizerCollection(recognizers: recognizerList)
4891
+ //
4892
+ // let customOverlayViewController: CustomOverlay = CustomOverlay.initFromStoryboard()
4893
+ //
4894
+ // // Reconfigure recognizers with the overlay
4895
+ // customOverlayViewController.reconfigureRecognizers(recognizerCollection)
4896
+ //
4897
+ // // Create the recognizer runner view controller with custom overlay
4898
+ // guard let recognizerRunnerViewController =
4899
+ // MBCViewControllerFactory.recognizerRunnerViewController(withOverlayViewController: customOverlayViewController) else {
4900
+ // showLicenseErrorAlert(message: "Failed to initialize the recognizer view controller.")
4901
+ // return
4902
+ // }
4903
+ //
4904
+ // customOverlayViewController.delegate = self
4905
+ // recognizerRunnerViewController.modalPresentationStyle = .fullScreen
4906
+ //
4907
+ // // Present the recognizer runner view controller
4908
+ // self.present(recognizerRunnerViewController, animated: true, completion: nil)
4909
4909
  }
4910
4910
 
4911
4911
  private func showLicenseErrorAlert(message: String) {
@@ -10828,68 +10828,68 @@ extension PaymentInfoVC: UITextFieldDelegate {
10828
10828
  }
10829
10829
 
10830
10830
  //MARK: - BlinkCard
10831
- extension PaymentInfoVC: MBCBlinkCardOverlayViewControllerDelegate {
10832
- func blinkCardOverlayViewControllerDidFinishScanning(_ blinkCardOverlayViewController: MBCBlinkCardOverlayViewController, state: MBCRecognizerResultState) {
10833
- /** This is done on background thread */
10834
- blinkCardOverlayViewController.recognizerRunnerViewController?.pauseScanning()
10835
-
10836
- var message: String = ""
10837
- var title: String = ""
10838
-
10839
- if blinkCardRecognizer.result.resultState == .valid {
10840
- title = "Payment card"
10841
-
10842
- let fullDocumentImage: UIImage! = blinkCardRecognizer.result.firstSideFullDocumentImage?.image
10843
- print("Got payment card image with width: \(fullDocumentImage.size.width), height: \(fullDocumentImage.size.height)")
10844
-
10845
- // Save the string representation of the code
10846
- message = blinkCardRecognizer.result.description
10847
- }
10848
-
10849
- /** Needs to be called on main thread beacuse everything prior is on background thread */
10850
- DispatchQueue.main.async {
10851
- // present the alert view with scanned results
10852
-
10853
- let alertController: UIAlertController = UIAlertController.init(title: title, message: message, preferredStyle: .alert)
10854
-
10855
- let okAction: UIAlertAction = UIAlertAction.init(title: "OK", style: .default,
10856
- handler: { (action) -> Void in
10857
- self.dismiss(animated: true, completion: nil)
10858
- })
10859
- alertController.addAction(okAction)
10860
- blinkCardOverlayViewController.present(alertController, animated: true, completion: nil)
10861
- }
10862
- }
10863
-
10864
- func blinkCardOverlayViewControllerDidTapClose(_ blinkCardOverlayViewController: MBCBlinkCardOverlayViewController) {
10865
- self.dismiss(animated: true, completion: nil)
10866
- }
10867
-
10868
- func blinkCardOverlayViewControllerDidFinishEditing(_ blinkCardOverlayViewController: MBCBlinkCardOverlayViewController, editResult: MBCBlinkCardEditResult) {
10869
- blinkCardOverlayViewController.recognizerRunnerViewController?.pauseScanning()
10870
- /** Needs to be called on main thread beacuse everything prior is on background thread */
10871
- DispatchQueue.main.async {
10872
- // present the alert view with scanned results
10873
- let alertController: UIAlertController = UIAlertController.init(title: "BlinkCard Edit Results", message: editResult.description, preferredStyle: .alert)
10874
-
10875
- let okAction: UIAlertAction = UIAlertAction.init(title: "OK", style: .default,
10876
- handler: { (action) -> Void in
10877
- self.dismiss(animated: true, completion: nil)
10878
- })
10879
- alertController.addAction(okAction)
10880
- blinkCardOverlayViewController.blinkCardEditViewController?.present(alertController, animated: true, completion: nil)
10881
- }
10882
- }
10883
-
10884
- }
10885
-
10886
- extension PaymentInfoVC: CustomOverlayDelegate {
10887
- func didFinishScanningCard(cardNumber: String, expiryDate: String, cvv: String, nameOnCard: String) {
10888
- // Update the text fields with scanned details
10889
- cardNumberTextField.text = cardNumber
10890
- cardExpiryTextField.text = expiryDate
10891
- cardCvvTextField.text = cvv
10892
- cardNameTextField.text = nameOnCard
10893
- }
10894
-
10895
- }
10831
+ //extension PaymentInfoVC: MBCBlinkCardOverlayViewControllerDelegate {
10832
+ // func blinkCardOverlayViewControllerDidFinishScanning(_ blinkCardOverlayViewController: MBCBlinkCardOverlayViewController, state: MBCRecognizerResultState) {
10833
+ // /** This is done on background thread */
10834
+ // blinkCardOverlayViewController.recognizerRunnerViewController?.pauseScanning()
10835
+ //
10836
+ // var message: String = ""
10837
+ // var title: String = ""
10838
+ //
10839
+ // if blinkCardRecognizer.result.resultState == .valid {
10840
+ // title = "Payment card"
10841
+ //
10842
+ // let fullDocumentImage: UIImage! = blinkCardRecognizer.result.firstSideFullDocumentImage?.image
10843
+ // print("Got payment card image with width: \(fullDocumentImage.size.width), height: \(fullDocumentImage.size.height)")
10844
+ //
10845
+ // // Save the string representation of the code
10846
+ // message = blinkCardRecognizer.result.description
10847
+ // }
10848
+ //
10849
+ // /** Needs to be called on main thread beacuse everything prior is on background thread */
10850
+ // DispatchQueue.main.async {
10851
+ // // present the alert view with scanned results
10852
+ //
10853
+ // let alertController: UIAlertController = UIAlertController.init(title: title, message: message, preferredStyle: .alert)
10854
+ //
10855
+ // let okAction: UIAlertAction = UIAlertAction.init(title: "OK", style: .default,
10856
+ // handler: { (action) -> Void in
10857
+ // self.dismiss(animated: true, completion: nil)
10858
+ // })
10859
+ // alertController.addAction(okAction)
10860
+ // blinkCardOverlayViewController.present(alertController, animated: true, completion: nil)
10861
+ // }
10862
+ // }
10863
+ //
10864
+ // func blinkCardOverlayViewControllerDidTapClose(_ blinkCardOverlayViewController: MBCBlinkCardOverlayViewController) {
10865
+ // self.dismiss(animated: true, completion: nil)
10866
+ // }
10867
+ //
10868
+ // func blinkCardOverlayViewControllerDidFinishEditing(_ blinkCardOverlayViewController: MBCBlinkCardOverlayViewController, editResult: MBCBlinkCardEditResult) {
10869
+ // blinkCardOverlayViewController.recognizerRunnerViewController?.pauseScanning()
10870
+ // /** Needs to be called on main thread beacuse everything prior is on background thread */
10871
+ // DispatchQueue.main.async {
10872
+ // // present the alert view with scanned results
10873
+ // let alertController: UIAlertController = UIAlertController.init(title: "BlinkCard Edit Results", message: editResult.description, preferredStyle: .alert)
10874
+ //
10875
+ // let okAction: UIAlertAction = UIAlertAction.init(title: "OK", style: .default,
10876
+ // handler: { (action) -> Void in
10877
+ // self.dismiss(animated: true, completion: nil)
10878
+ // })
10879
+ // alertController.addAction(okAction)
10880
+ // blinkCardOverlayViewController.blinkCardEditViewController?.present(alertController, animated: true, completion: nil)
10881
+ // }
10882
+ // }
10883
+ //
10884
+ //}
10885
+ //
10886
+ //extension PaymentInfoVC: CustomOverlayDelegate {
10887
+ // func didFinishScanningCard(cardNumber: String, expiryDate: String, cvv: String, nameOnCard: String) {
10888
+ // // Update the text fields with scanned details
10889
+ // cardNumberTextField.text = cardNumber
10890
+ // cardExpiryTextField.text = expiryDate
10891
+ // cardCvvTextField.text = cvv
10892
+ // cardNameTextField.text = nameOnCard
10893
+ // }
10894
+ //
10895
+ //}
@@ -1,6 +1,6 @@
1
1
  Pod::Spec.new do |s|
2
2
  s.name = 'easymerchantsdk'
3
- s.version = '1.7.1'
3
+ s.version = '1.7.2'
4
4
  s.summary = 'A React Native SDK for Easy Merchant.'
5
5
  s.description = <<-DESC
6
6
  A React Native SDK to enable Easy Merchant functionality in mobile applications.