Posts

Post not yet marked as solved
2 Replies
2.7k Views
I implemented the apple pay with a stripe. When I tap the apple pay button it doesn't show any payment sheet and it always returns the nil value. The code is :applepayButton.isEnabled = Stripe.deviceSupportsApplePay() let merchantIdentifier = "merchant.deyaPayApplepay" let paymentRequest = Stripe.paymentRequest(withMerchantIdentifier: merchantIdentifier, country: "US", currency: "usd") // Configure the line items on the payment request paymentRequest.paymentSummaryItems = [ //PKPaymentSummaryItem(label: "Fancy Hat", amount:NSDecimalNumber(value :amount)), // The final line should represent your company; // it'll be prepended with the word "Pay" (i.e. "Pay iHats, Inc $50") PKPaymentSummaryItem(label: "amount to be added", amount:NSDecimalNumber(value :amount)), ] if Stripe.canSubmitPaymentRequest(paymentRequest) { // Setup payment authorization view controller let paymentAuthorizationViewController = PKPaymentAuthorizationViewController(paymentRequest: paymentRequest) paymentAuthorizationViewController?.delegate = self // Present payment authorization view controller self.present((paymentAuthorizationViewController)!, animated: true,completion: nil) } else { // There is a problem with your Apple Pay configuration print("apple pay is not configred properly"); } } func paymentAuthorizationViewController(_ controller: PKPaymentAuthorizationViewController, didAuthorizePayment payment: PKPayment, completion: @escaping (PKPaymentAuthorizationStatus) -> Void) { STPAPIClient.shared().createToken(with: payment) { (token: STPToken?, error)-> Void in print("Stripe token is \(String(describing: token!))") completion(.success) let b = String(describing: token!) } } func paymentAuthorizationViewControllerDidFinish(_ controller: PKPaymentAuthorizationViewController) { //Dismiss payment authorization view controller dismiss(animated: true, completion: { if (true) { // print("Payment Success") // Show a receipt page... } }) }It always the "apple pay is not configured properly". It is worked fine in simulator but when it runs in real device it shows the else condition rather than if condition. Why it is not working properly in real device
Posted Last updated
.
Post not yet marked as solved
0 Replies
994 Views
I want to display apple wallet when the user clicks the add cards to the wallet in my ios app. So I added the com.apple.developer.payment-pass-provisioning in entitlements file and also created apple certicate and enable the apple pay and wallet in my xcode. For adding cards into apple wallet do i need to get the special permission from apple except the certificates or this certificates ok. Please give clarity about it. Thank you
Posted Last updated
.
Post not yet marked as solved
0 Replies
1.2k Views
I implemented apple pay with stripe in ios swift using stipe provided documents. When i execute the apple pay program it is worked fine🙂 in simulator of xcode but when i execute the same program in real iphone device it doesn't work and it doesn't display payment sheet to processing transaction😟. So for testing apple pay in real device is it require to add testcards in wallet or is ie neccessary to have sandbox account in apple developers to test apple pay in apps. and i had another doudt 😕that is is it require to add cards when using apple pay with stripe. please give me a clarity about this.Thank you.
Posted Last updated
.