Skip to content

Commit d68b9c9

Browse files
committed
AuthWebView shouldn't scale pages to fit
1 parent ef53271 commit d68b9c9

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Example/Paystack iOS Example/ViewController.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ class ViewController: UIViewController, PSTCKPaymentCardTextFieldDelegate {
1212
// Replace these values with your application's keys
1313
// Find this at https://dashboard.paystack.co/#/settings/developer
1414
let paystackPublicKey = ""
15+
// let paystackPublicKey = "pk_live_ed8a7004bb85bf636a0a22c635ad9d1788caa5de"
1516

1617
// To set this up, see https://github.com/PaystackHQ/sample-charge-card-backend
1718
let backendURLString = ""
19+
// let backendURLString = "https://calm-scrubland-33409.herokuapp.com"
1820

1921
let card : PSTCKCard = PSTCKCard()
2022

@@ -105,6 +107,10 @@ class ViewController: UIViewController, PSTCKPaymentCardTextFieldDelegate {
105107
func chargeWithSDK(newCode: NSString){
106108
let transactionParams = PSTCKTransactionParams.init();
107109
transactionParams.access_code = newCode as String;
110+
//transactionParams.additionalAPIParameters = ["enforce_otp": "true"];
111+
//transactionParams.email = "[email protected]";
112+
//transactionParams.amount = 2000;
113+
108114
// use library to create charge and get its reference
109115
PSTCKAPIClient.shared().chargeCard(self.cardDetailsForm.cardParams, forTransaction: transactionParams, on: self, didEndWithError: { (error, reference) in
110116
self.outputOnLabel(str: "Charge errored")

Paystack/UI/PSTCKAuthViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ - (void)viewDidLoad {
4545

4646
self.authenticationWebView = [[UIWebView alloc] init];
4747
self.authenticationWebView.delegate = self;
48-
self.authenticationWebView.scalesPageToFit = YES;
48+
self.authenticationWebView.scalesPageToFit = NO;
4949
[self.view addSubview:self.authenticationWebView];
5050
[self.navigationController setNavigationBarHidden:NO animated:YES];
5151
self.navigationController.modalTransitionStyle = UIModalTransitionStyleCoverVertical;

0 commit comments

Comments
 (0)