Apple Pay

RSS for tag

Discuss how to integrate Apple Pay into your app for secure and convenient payments.

Apple Pay Documentation

Post

Replies

Boosts

Views

Activity

PKPass bundle (.pkpasses) not working in IOS17
I am facing issues with .pkpasses bundle. Currently, I generate multiple .pkpass files, and store them in a zip as .pkpasses. Once I drag this ZIP into my IOS simulator or mail it to my iPhone, nothing happens. These are the steps I followed (https://developer.apple.com/documentation/walletpasses/distributing_and_updating_a_pass) Create a .zip file containing the .pkpass files for the passes that are part of the bundle. Change the extension of the .zip file to .pkpasses. I have uploaded my bundle.pkpass to Google Drive: https://drive.google.com/file/d/1UIjRpiwWtYGnPILDQV3aAfmu1D7MGE_L/view?usp=sharing Is anybody facing similar problems? I am not sure if this is an IOS17 issue, because I haven't worked with .pkpasses files before.
2
0
1.5k
Oct ’23
Links in Apple Wallet pass not interactive.
I have a Apple Wallet Pass with a back field declared like so: { key: 'EnableLink', label: 'Powered by', value: 'Enable.tech', attributedValue: "<a href='https://enable.tech'>Enable.tech</a>" } When the wallet pass is active (side button pressed twice), and the user goes to the back of the pass, the link is visible and highlighted, however tapping it does not open the linked webpage in a browser. There are tel: links as well, that cannot be interacted with as well. Anyone know a workaround or a fix?
0
0
432
Nov ’23
the object does not support the operation or argument
If the customer closes Apple payment sheet before validation is complete, the error appears. It's not a big deal, but we are improving our performance, so I need to fix this annoying log: My code to validate merchant works and is this (I'm using braintree with apple pay): // Validate merchant session.onvalidatemerchant = async event => { // Do request const response = await getApplePay() console.log(response) if (response.success) { instance.performValidation({ validationURL: event.validationURL, displayName: 'Bucked Up' }, (err, merchantSession) => { if (err) { setLoadingApple(false) session.abort() return } else if(merchantSession) { session.completeMerchantValidation(response.data) setLoadingApple(false) } }) } else { setLoadingApple(false) session.abort() } }
0
1
652
Oct ’23
Apple Pay Js integration: session.completeMerchantValidation() is failing
Hi Team I am trying to integrate apple pay into my system but session.completeMerchantValidation() is failing Error For generating merchant session I am using this url https://apple-pay-gateway-cert.apple.com/paymentservices/paymentSession In response i am getting merchant session but after passing that merchant session I am getting error as mentioned above in the image I am stuck since 2 weeks but not getting any solution, your quick response will clear my blocker Regards Rutvij Doshi
1
0
496
Oct ’23
Apple Pay Payment Processing Certificate
【Event】 The Apple Pay certificate will expire. Used to encrypt Apple Pay tokens. We use stripe. 【Steps】 Download the .certSigningRequest (CSR file) from Stripe (on the Stripe dashboard). Select the merchant ID to add to this certificate, click 'Create Certificate' in the Apple Pay Payment Processing Certificate section (on Apple). When prompted to upload a certificate signing request, select the .certSigningRequest file you have downloaded and proceed to download. Verify that the details of the certificate are correct, and download the certificate locally. Upload the new certificate file on Stripe. Go back to Apple’s Developer Center, select the MerchantID and activate the Apple Pay Payment Processing Certificate (Apple Pay settlement processing certificate) you created. 【Question】 I would like to understand the method for rolling back in case the update of the certificate unexpectedly fails. I am contemplating the following measures; would they be feasible? Preserve the old certificate Reactivate the old certificate once more Additionally, do you have any other proposals?
1
0
1.2k
Oct ’23
InvalidAccessError: Must create a new ApplePaySession from a user gesture handler
I have troubles sometimes (with slow internet connections) when the customers clicks on my Buy Now button, i got the error "Must crerate a new ApplePaySession from a user gesture hanlder..." I removed some logics to shipping to nt make this too long, but essentially my code is: export default function ApplePayButton({setLoadingApple}) { // Effects React.useEffect(() => { // listen click const button = document.querySelector('apple-pay-button') if(button){ button.addEventListener('click', startApplePaySession) } return () => { button.removeEventListener('click', startApplePaySession) } }, []) // Methods const selectStep = step => { // Check if step is available if (state.steps.allowed >= step) { dispatch({ type: 'UPDATE_STEPS', data: { ...state.steps, current: step } }) } } const startApplePaySession = () => { const apple = window.buckedup.payment_extensions.find(extension => extension.code === 'apple_pay') if (window.ApplePaySession && apple) { setLoadingApple(true) let clientToken if (window.braintree_config) { const { token } = window.braintree_config clientToken = token } window.braintree.client.create({ authorization: clientToken }, (clientErr, clientInstance) => { if (clientErr) { setLoadingApple(false) console.error('Error creating client:', clientErr) return } window.braintree.applePay.create({ client: clientInstance }, (applePayErr, applePayInstance) => { if (applePayErr) { setLoadingApple(false) console.error('Error creating applePayInstance:', applePayErr) return } const amount = state.totals.amount_due.amount const appleSession = window.ApplePaySession // Build request object const request = applePayInstance.createPaymentRequest({ 'countryCode': 'US', 'currencyCode': 'USD', 'merchantCapabilities': [ 'supports3DS', 'supportsDebit', 'supportsCredit' ], 'shippingMethods': [], 'shippingType': 'shipping', 'supportedNetworks': [ 'visa', 'masterCard', 'amex', 'discover' ], 'requiredBillingContactFields': [ 'postalAddress', 'name' ], 'requiredShippingContactFields': [ 'postalAddress', 'name', 'phone', 'email' ], 'total': { 'label': 'Bucked Up', 'amount': amount, 'type': 'final' } }) // Define ApplePayPaymentRequest const session = new appleSession(3, request) // Validate merchant session.onvalidatemerchant = async event => { // Do request const response = await getApplePay() applePayInstance.performValidation({ validationURL: event.validationURL, displayName: 'Bucked Up' }, (err, merchantSession) => { if (err) { setLoadingApple(false) return } session.completeMerchantValidation(response.data) setLoadingApple(false) }) } // Validate payment method session.onpaymentmethodselected = async event => { // Update totals const totals = await postApplePayment() const update = { 'newTotal': { 'label': 'Bucked Up', 'amount': totals.data.amount_owed } } session.completePaymentMethodSelection(update) } // Request to track shipping user data session.onshippingcontactselected = async event => { // Extract user available const dataShipping = event.shippingContact let body // Do first request to checkout endpoint const responseData = await shippingService(body) if (responseData.success) { // Get Shipping methods const body = { combined_shipments: true } const responseMethods = await getMethods(body) if (responseMethods.success) { const methods = responseMethods.data.shipments // Do request to update totals const responseTotals = await postApplePayment() const update = { 'newTotal': { 'label': 'Bucked Up', 'amount': responseTotals.data.amount_owed }, 'newShippingMethods': mappedMethods } session.completeShippingContactSelection(update) } } } // Authorize purchase session.onpaymentauthorized = async (event) => { applePayInstance.tokenize({ token: event.payment.token }, async (tokenizeErr, payload) => { if (tokenizeErr) { console.error('Error tokenizing Apple Pay:', tokenizeErr) session.completePayment(appleSession.STATUS_FAILURE) return } const nonce = payload.nonce const billing = event.payment.billingContact const shipping = event.payment.shippingContact const body = { shipping, billing } const response = await patchApplePayment(body) if (response.success) { // Process payment const bodyBraintree = { apple_pay: true, payment_method_nonce: nonce } const responseBraintree = await postBraintree(bodyBraintree) if (responseBraintree.success) { // Define ApplePayPaymentAuthorizationResult const result = { 'status': appleSession.STATUS_SUCCESS } session.completePayment(result) location.href = `${API_URL}checkout/thank-you` } } }) } session.oncancel = (event) => { console.log(event, 'session cancel') setLoadingApple(false) selectStep(1) } session.begin() } ) }) } } return ( <apple-pay-button buttonstyle='black' locale='en' type='plane' /> ) }
0
0
916
Oct ’23
Hyperlink on Apple pass backfield does not work thru double tapping the power button
I'm encountering an issue with the Apple Pass Store card type backfield hyperlink not working when opened from double-clicking the power button. The value contains an HTML tag with a reference to our webpage. Everything works fine when we open it from the Wallet app, but the hyperlink doesn't seem to work when opened from the power button double-click. Has anyone else experienced this issue or have any suggestions for troubleshooting? Any help would be greatly appreciated. Thank you!
1
0
671
Apr ’23
Apple Pay on the Web with API in the middle
Hi, I was wondering if it's possible to use our API (backend app) in between my website (frontend app) and Apple servers. This means having a website (frontend app) with all the logic to present the Apple Pay button and handle ApplePaySession events, on the click to pay it communicates with our API (backend app), and that will communicate with Apple servers. Receiving the response and send it back to the front-end website. With Merchant Identity Certificate set up for the API, and assuming that for the Domain validation, we need only the API domain as well. As an example let's say that the website runs on https://website.example.com and the API on https://api.example.com, both as HTTPS. So the flow would be: Website (frontend app) <-> API (backend app) <-> Apple server Is this implementation possible? Thanks!
0
0
373
Oct ’23
I can't add girocard in my wallet sandbox For Apple Pay
I am trying to add girocard in my wallet Sandbox from our app but I am getting an error like in screenshot. Even through PKAddPaymentPassRequestConfiguration is correct, I can't continue provisioning. In that webpage, there is only information regarding credit cards. https://developer.apple.com/apple-pay/sandbox-testing/ Can you please help me regarding that issue? guard let addPaymentPassRequestConfiguration = PKAddPaymentPassRequestConfiguration( encryptionScheme: .ECC_V2 ) else { return } addPaymentPassRequestConfiguration.style = .payment addPaymentPassRequestConfiguration.cardholderName = debitCard.cardholder addPaymentPassRequestConfiguration.primaryAccountSuffix = String(girocard.cardNumber.suffix(4)) addPaymentPassRequestConfiguration.localizedDescription = girocard.cardType.cardDisplayName addPaymentPassRequestConfiguration.paymentNetwork = .girocard guard let addPaymentPassViewController = AddPaymentPassViewController( requestConfiguration: addPaymentPassRequestConfiguration, delegate: self ) else { return } let addPaymentPassRequest = PKAddPaymentPassRequest() addPaymentPassRequest.encryptedPassData = giroCardPaymentPassData.encryptedData addPaymentPassRequest.activationData = giroCardPaymentPassData.activationData addPaymentPassRequest.ephemeralPublicKey = giroCardPaymentPassData.ephemeralPublicKey handler(addPaymentPassRequest)
0
0
409
Oct ’23
Merchant domains changed status to pending
The domains registered for several of my merchant ID's had their status changed to “Pending” in some moment, but I didn’t receive any alert. We just realized that this happened when there was a payment attempt and it was denied. How can this be avoided in the future? Is there some email registered to receive messages alerting for these changes? Can I update it?
0
0
293
Oct ’23
Apple Pay on website
ApplePay.tsx Sometimes when we load the Apple sheet for the first time, the onshippingcontactselected is not called at all, although there is a default address selected, when we try again it works. In some cases as well the Apple sheet freezes, all the buttons become un clickable. There are no errors. I'm testing on Mac version 11.5.2. please see the attached the code.
0
0
351
Oct ’23
Expired certificate apple-pay-gateway.apple.com
Hi, the certificate apple-pay-gateway.apple.com (https://developer.apple.com/documentation/apple_pay_on_the_web/setting_up_your_server) used for payments has expired : Server Key and Certificate #1 Subject apple-pay-gateway.apple.com Fingerprint SHA256: 19a1e3eeb0b13c3aefe03d4c02de6befb4200430ead97ee4150b3e0eaad89ec6 Pin SHA256: 38yRXBg6sU+IsJldFjKUj6TwTqkbVymXhyvMBWxMtV0= Common names apple-pay-gateway.apple.com Alternative names cn-apple-pay-gateway-tj-pod2.apple.com apple-pay-gateway-nc-pod1.apple.com apple-pay-gateway-nc-pod4.apple.com apple-pay-gateway-sh-pod2.apple.com cn-apple-pay-gateway-pr-pod3.apple.com apple-pay-gateway-pr-pod3.apple.com apple-pay-gateway-nc.apple.com apple-pay-gateway-tj-pod1.apple.com apple-pay-gateway-tj-pod2.apple.com apple-pay-gateway-pr-pod5.apple.com cn-apple-pay-gateway-nc-pod4.apple.com cn-apple-pay-gateway-pr-pod1.apple.com cn-apple-pay-gateway-sh-pod3.apple.com cn-apple-pay-gateway.apple.com cn-apple-pay-gateway-tj-pod3.apple.com apple-pay-gateway-nc-pod2.apple.com apple-pay-gateway-pr-pod1.apple.com apple-pay-gateway-pr-pod4.apple.com apple-pay-gateway-sh-pod3.apple.com cn-apple-pay-gateway-sh-pod1.apple.com cn-apple-pay-gateway-nc-pod3.apple.com cn-apple-pay-gateway-pr-pod2.apple.com apple-pay-gateway-nc-pod3.apple.com apple-pay-gateway-pr-pod.apple.com apple-pay-gateway-nc-pod5.apple.com apple-pay-gateway-tj-pod3.apple.com cn-apple-pay-gateway-pr-pod4.apple.com apple-pay-gateway-sh-pod1.apple.com cn-apple-pay-gateway-nc-pod5.apple.com apple-pay-gateway-pr-pod2.apple.com cn-apple-pay-gateway-sh-pod.apple.com cn-apple-pay-gateway-nc-pod1.apple.com apple-pay-gateway.apple.com cn-apple-pay-gateway-nc-pod2.apple.com cn-apple-pay-gateway-sh-pod2.apple.com apple-pay-gateway-pr.apple.com cn-apple-pay-gateway-tj-pod1.apple.com apple-pay-gateway-nc-pod.apple.com Serial Number 0b2ffee60fc2a32e5046bf43075c1f89 Valid from Tue, 18 Jul 2023 10:53:06 UTC Valid until Mon, 16 Oct 2023 11:03:06 UTC (expired 38 minutes and 13 seconds ago) EXPIRED Trusted : No NOT TRUSTED
1
0
585
Oct ’23