Apple Pay on the Web

RSS for tag

Apple Pay on the Web allows you to accept Apple Pay on your website using JavaScript-based APIs.

Posts under Apple Pay on the Web tag

122 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Apple Pay guidelines clarification
Hello there, I have a couple of question about Apple Pay guidelines: • if we offer Apple Pay payment method in our app, can we disable the selection (I mean the method selection NOT the Payment button!) IF certain condition happens? E.g. the user cannot select apple pay payment method because our basket is not ready yet. • Are we forced to move the apple pay payment method on the top of our selection? E.g. Cards, Cash On Delivery, Coupon, Apple Pay --> Apple Pay, Cards, Cash On Delivery, Coupon One last technical question: • when we start the payment process we are gonna create the request and present the sheet BUT we have to call our backend for pre-authorization, is it allowed? @objc private func applePayButtonTapped(sender: UIButton) { // TODO: Is it allowed? // We need to ask to our backend a pre-authorization and THEN procced with Apple Pay flow // but this could be done ONLY after the user TAP on BUY with APPLE PAY and BEFORE // paymentAuthorizationViewController is called. // Are we compliant to do that? if PKPaymentAuthorizationViewController.canMakePayments(usingNetworks: FakeData.paymentInfo()) { let request = PKPaymentRequest() request.blablabla = blabla let authorizationViewController = PKPaymentAuthorizationViewController(paymentRequest: request) if let viewController = authorizationViewController { viewController.delegate = self present(viewController, animated: true, completion: nil) } } } Thanks in advance :)
0
0
72
1d
adding ApplePayDeferredPaymentRequest request is cancelled
Hi, I'm adding deferredPaymentRequest container to get MPan, but payment is now cancelled by Webkit, no other explanation What is the next step to get mpan ? Regards, Louis "deferredPaymentRequest": { "deferredBilling": { "label": "Deferred Payment", "amount": "1.99", "type": "final", "paymentTiming": "deferred", "deferredPaymentDate": "2024-06-1", }, "managementURL": 'https://.../apmsim/pay/appleManagement', "paymentDescription": "this is a paymentDescription", }
0
0
112
1w
Sandbox tester account not able to add test cards for testing
Hello team , We have created a sandbox tester and added all the setting as per the guidelines but the sandbox tester account is blocked from adding the test card . All the test cards show as invalid card . We are not able to able to add wallet from iCloud . We are not able to sign into iTunes with the sandbox tester account . Please help on how to resolve this . Thanks in Advance
0
0
148
2w
Unable to create Sandbox Apple IDs
I have a Developer account with a Developer Role, although apparently without the stated ability to create my own Sandbox ID. So, our company's Administrator is trying to create one for me. But each time he enters a new icloud.com address to create one, he gets the error, "Your Apple ID or password was entered incorrectly." (The example at the above link uses icloud.com, and that seems the natural place to do this. I'm assuming that since you can't actually create an icloud.com email without an Apple ID, that this sandbox creation process should be ok with the email not existing yet.)
1
0
165
2w
Getting Error when verifying merchant
I want to integrate an apple pay account on the website, but on the point where I am validating merchant that return "false" responses . I already followed the documentation and tried many times but still did not resolve it. Please help me to resolve this issue. so that i can integrate apple pay for heartland. here i mentioned my block of code where i am verifying merchant, please help to fix this. server side code: (PHP): $merchantSession = fetchAppleMerchantSession($validationURL); echo json_encode($merchantSession); function fetchAppleMerchantSession($validationUrl){ $cert_url = base_path('cert/merchant.pem'); $cert_key = base_path('cert/merchant.key'); $data = [ 'merchantIdentifier' => 'domain.com', 'domainName' => 'domain.com', 'displayName' => 'Disp Name', 'initiative' => 'web', 'initiativeContext' => 'domain.com' ]; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $validationUrl); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); curl_setopt($ch, CURLOPT_CERTINFO, true); curl_setopt($ch, CURLOPT_VERBOSE, true); curl_setopt($ch, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2); curl_setopt($ch, CURLOPT_SSLCERT, $cert_url); curl_setopt($ch, CURLOPT_SSLKEY, $cert_key); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json")); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $res = curl_exec($ch); curl_close($ch); $result = json_encode($res); return ['data' => $result, 'status' => false]; } client side code (JS): // Create Apple Pay session within the user gesture handler const session = new ApplePaySession(6, paymentRequest); // Handle merchant validation session.onvalidatemerchant = (event) => { console.log("event", {event, session}); const validationURL = event.validationURL; fetch('gp_applepay_validate.php', { // Replace with your server-side validation endpoint method: 'POST', headers: { 'Content-Type': 'application/json', 'Access-Control-Allow-Headers': "*" }, body: JSON.stringify({ validationURL }), }) .then((response) => { console.log("response.json()", response); return response.json(); }) .then((data) => { console.log("datappp", data); if (data.status) { event.completeMerchantValidation(data.data); } else { console.error('Merchant validation failed:', data.data); session.abort(); alert('Payment failed: ' + data.data); // Improve error message } }) .catch((error) => { console.error('Error during merchant validation:', error); session.abort(); alert('An error occurred during payment. Please try again later.'); // Generic error message for user }); };
1
0
160
3w
Apple Pay Sandbox with Payment Not Completed
Team, When I try using Apple pay for Japan, we are getting Payment Not Completed error for a merchant with Japanese character as the displayName at completeMerchantValidation. The same works well if the merchant has name in English. log from com.apple.passkit as explained in Apple Pay on the Web Debugging Guide 2024-04-30 12:12:21.441231+0530 0xb6bd16 Default 0x0 55547 0 com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] Received <private> status: PKPaymentAuthorizationStatusSuccess 2024-04-30 12:12:21.441336+0530 0xb6bd16 Default 0x0 55547 0 com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] Evaluating merchant session using PROD trust policy. 2024-04-30 12:12:21.448371+0530 0xb6bd16 Default 0x0 55547 0 com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] State machine change state from PKPaymentAuthorizationStateClientCallback to PKPaymentAuthorizationStatePrepareTransactionDetails with param: <private> 2024-04-30 12:12:21.448393+0530 0xb6bd16 Default 0x0 55547 0 com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitMacHelper) [com.apple.passkit:PaymentUI] State change: PKPaymentAuthorizationStatePrepareTransactionDetails 2024-04-30 12:12:21.448444+0530 0xb6bd16 Error 0x0 55547 0 com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitMacHelper) [com.apple.passkit:PaymentUI] State change not implemented: PKPaymentAuthorizationStatePrepareTransactionDetails 2024-04-30 12:12:21.450878+0530 0xb6bd16 Default 0x0 55547 0 com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] Performing request: POST <private> { 7 <private> fields } 500 bytes 2024-04-30 12:12:22.642216+0530 0xbaa237 Default 0x0 55547 0 com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] Task Completed: <private> 2024-04-30 12:12:22.642348+0530 0xbaa237 Default 0x0 55547 0 com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] Response: <private> 400 Time profile: 1.19145 seconds { 6 <private> fields } 232 bytes 2024-04-30 12:12:22.642571+0530 0xb6bd16 Default 0x0 55547 0 com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] State machine change state from PKPaymentAuthorizationStatePrepareTransactionDetails to PKPaymentAuthorizationStateFatalError with param: <private> 2024-04-30 12:12:22.642617+0530 0xb6bd16 Default 0x0 55547 0 com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitMacHelper) [com.apple.passkit:PaymentUI] State change: PKPaymentAuthorizationStateFatalError 2024-04-30 12:12:22.642757+0530 0xb6bd16 Error 0x0 55547 0 com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitMacHelper) [com.apple.passkit:PaymentUI] Payment failed with fatal error <private> 2024-04-30 12:12:22.643288+0530 0xb6bd16 Default 0x0 55547 0 com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Analytics] subject: inApp event: <private> 2024-04-30 12:12:22.659154+0530 0xb6bd16 Default 0x0 55547 0 com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitMacHelper) [com.apple.passkit:PaymentUI] glyphView - revealedErrorAction() 2024-04-30 12:12:24.633308+0530 0xb6bad7 Default 0x0 55529 0 Safari: (PassKitMacHelperTemp) [com.apple.passkit:Payment] Invalidate extension <private> identifier <private> 2024-04-30 12:12:24.653014+0530 0xb6bd16 Info 0x0 55547 0 com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Connections] PKInAppPaymentService:0x12bf1b660 (0x1290e2a80): Tearing down existing connection 2024-04-30 12:12:24.653173+0530 0xbaaa12 Info 0x0 68603 0 passd: [com.apple.passkit:Connections] PDXPCServiceListener 2 (0x127705150:55547): connection invalidated 2024-04-30 12:12:24.654891+0530 0xb6bd16 Default 0x0 55547 0 com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Analytics] subject: inApp event: <private> As we can see, com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitMacHelper) [com.apple.passkit:PaymentUI] Payment failed with fatal error <private>, how do we debug this further?
2
0
237
Apr ’24
Apple Pay Sheet Not Showing on iPhones
Hi guys, I'm working on Apple Pay integrating it into web, but I'm having a problem the payment sheet is not showing on safari browser and iPhone devices (the apple pay button is showing but not clickable and no error logs) but it showing on iPad devices (the payment sheet is showing after the user clicks on the button). Is there anyone same as issue like this? Thank you for any help.
0
0
131
Apr ’24
Developer Program Enrollment
I have been trying to enroll onto the program for sometime now but it doesn't go through. I provided every detail accurately but still haven't received any meaningful update. Is it normal that during the purchase we aren't asked to provide the CVV number of our credit card hence payment couldn't be processed or what? The email I received highlighted an enroll request and order. I have consistently sent so many messages but no replies. If the wait time is even a year, isn't it advisable to make it known to the people rather than making it seem an easy process of only two business days. The time I received has long elapsed and I don't how to go about it now. Nothing works.
0
0
201
Apr ’24
How to react to card network on onpaymentmethodselected?
We're currently evaluating Apple Pay as a payment method on our site. For Amex US credit card payments, we charge a payment fee. For other credit cards, there is no such fee. However, for Apple Pay it seems we cannot configure this. What we currently tried is to implement onpaymentmethodselected. However, only the card type is part of the event, not the card network. Example code: session.onpaymentmethodselected = event => { /* event.paymentMethod only contains {type: "credit"} */ console.log('onpaymentmethodselected', event.paymentMethod); /* event.paymentMethod.network is therefore undefined, if we could have here 'amex', 'mastercard' etc, we could implement the payment fee we currently have*/ console.log('onpaymentmethodselected', event.paymentMethod.network); session.completePaymentMethodSelection({}); }; Is there a way to access the network in this callback? Or is there another way to implement payment fees with certain networks used via Apple Pay?
0
0
212
Apr ’24
how to use APPLE WALLET API?
Hello there, i'm new in trying to use the apple wallet API. we want to create passes to add identification credentials in the costumer's apple wallet. but we have doubts, for example: is it mandatory to pay the apple developer memebership to use the examples of apple wallet api? also, is there a way or an example of using this API in node.js? Thanks for your attention, i will be waiting for your answers.
0
0
276
Apr ’24
Merchant Validation Failure
I currently have two merchant id's configured in our production environment which are tied to separate certificates. The one below was recently created for our OlO integration which uses Spreedly. The other integration is with Worldpay directly. When attempting to validate the new merchant id for OlO, we get the following response. Request Body { "merchantIdentifier":"merchant.com.cbolo.prod", "displayName":"Cracker Barrel", "initiative":"web", "initiativeContext":"stage.crackerbarrel.com" } Response Body { "statusMessage": "Payment Services Exception merchantId=745C2D1BC1B86B0E3FF898001666D44AADE6EC457F128075A723DA511D0BA0B4 unauthorized to process transactions on behalf of merchantId=D276804A1BF06DADBAE2DC291266FB87C15C8E6702959025D56CF4694FAB56C4 reason=D276804A1BF06DADBAE2DC291266FB87C15C8E6702959025D56CF4694FAB56C4 never authorized mass enablement transactions to occur via 745C2D1BC1B86B0E3FF898001666D44AADE6EC457F128075A723DA511D0BA0B4", "statusCode": "400" } We have followed all the steps documented around verifying our domains and still we get this error. Has anyone had this issue and been able to resolve? We opened an Apple Support case 4 business days ago and have heard nothing back. Case: 102259384074.
1
0
373
Apr ’24
How can I manage multiple certificates?
I work on integrating online payment gateways. We are currently integrating Stripe and Adyen payment gateways. However, when integrating with Stripe, we use the certificate file provided by Stripe, and for Adyen, since there are not many payment transactions, we cannot create our own account, so we are using an account from a partner company. Therefore, we also have to use the Apple Pay certificate file from the partner company. In other words, the certificate files for Stripe and Adyen are different, but we want to get verification for the same domain. How can we set up to differentiate between Stripe and Adyen for the same domain with two different certificate files? The framework we are using is React.js for the frontend and Node.js for the backend.
0
0
266
Mar ’24
apple pay session ECONNRESET
We were try to call Apple Pay startSession, but we are getting an following error, exception: Error: Error: socket hang up at SCAwsPay.validateSessiont (D:\projects\amazon_payment_nodejs\routes\controllers\secondaryControllers\SCAwsPay.js:158:19) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async D:\projects\amazon_payment_nodejs\routes\awsPay.js:56:18, const { merchantIdentifier, domainName, initiativeContext, initiative, displayName } = payload; const httpsAgent = new https.Agent({ rejectUnauthorized: false, cert: certificate, key: key, passphrase: 'team123' }); const headers = { 'Content-Type': 'application/json', }; let response = await axios.post("https://apple-pay-gateway.apple.com/paymentservices/startSession", { merchantIdentifier, domainName, displayName, }, { // headers, httpsAgent }); I kindly request your support in resolving this issue as soon as possible. Apple Pay is an essential feature for me, and I would greatly appreciate any guidance or solutions you can provide. Thank you for your attention to this matter. I look forward to your prompt response and assistance in resolving this issue.
0
0
328
Mar ’24
SSL issue with Apple pay web integration
I am seeking an assistance with an issue we've encountered during our efforts to integrate Apple Pay into our web application. We're using Angular on our client side. and our server side is powered by AEM(Adobe Experience Manager), which is based on Java. As part of our integration process, we're following the Apple Pay documentation. However, we've encountered a challenge during the merchant validation step. Our server-side implementation, responsible for validating the merchant identity and generating a session object for payment requests, is encountering an SSL handshake error. Here's the error message we're encountering: javax.net.ssl|FINE|01|main|2024-03-20 05:19:52.812 IST|SSLCipher.java:1817|KeyLimit read side: algorithm = AES/GCM/NOPADDING:KEYUPDATE countdown value = 137438953472 javax.net.ssl|FINE|01|main|2024-03-20 05:19:52.813 IST|SSLCipher.java:1971|KeyLimit write side: algorithm = AES/GCM/NOPADDING:KEYUPDATE countdown value = 137438953472 javax.net.ssl|FINE|01|main|2024-03-20 05:19:52.849 IST|SSLCipher.java:1817|KeyLimit read side: algorithm = AES/GCM/NOPADDING:KEYUPDATE countdown value = 137438953472 javax.net.ssl|FINE|01|main|2024-03-20 05:19:52.850 IST|SSLCipher.java:1971|KeyLimit write side: algorithm = AES/GCM/NOPADDING:KEYUPDATE countdown value = 137438953472 javax.net.ssl|FINE|01|main|2024-03-20 05:19:54.082 IST|Utilities.java:73|the previous server name in SNI (type=host_name (0), value=apple-pay-gateway-cert.apple.com) was replaced with (type=host_name (0), value=apple-pay-gateway-cert.apple.com) javax.net.ssl|FINE|01|main|2024-03-20 05:19:54.448 IST|SSLCipher.java:1817|KeyLimit read side: algorithm = AES/GCM/NOPADDING:KEYUPDATE countdown value = 137438953472 javax.net.ssl|FINE|01|main|2024-03-20 05:19:54.448 IST|SSLCipher.java:1971|KeyLimit write side: algorithm = AES/GCM/NOPADDING:KEYUPDATE countdown value = 137438953472 javax.net.ssl|SEVERE|01|main|2024-03-20 05:19:54.453 IST|TransportContext.java:369|Fatal (CERTIFICATE_UNKNOWN): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target ( "throwable" : { sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:439) at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:306) at sun.security.validator.Validator.validate(Validator.java:271) at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:312) at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:221) at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:128) at sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(CertificateMessage.java:1339) at sun.security.ssl.CertificateMessage$T13CertificateConsumer.onConsumeCertificate(CertificateMessage.java:1230) at sun.security.ssl.CertificateMessage$T13CertificateConsumer.consume(CertificateMessage.java:1173) at sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:376) at sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:479) at sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:457) at sun.security.ssl.TransportContext.dispatch(TransportContext.java:200) at sun.security.ssl.SSLTransport.decode(SSLTransport.java:155) at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280) at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:434) ... 24 more} } We've reviewed our server configuration and checked that the SSL/TLS settings are correctly configured. Additionally, we've ensured that the server's SSL certificate is valid and up-to-date.
0
0
246
Mar ’24
How to implement Dynamic QR Code passes for apple wallet?
I want to create passes with Dynamic QR Codes which changes based on T-OTP. Google wallet do have this feature called RotatingBarCode, while there is nothing like this in Apple wallet. Can we do this by updating the passes? If yes, how? If apple wallet pass are getting updates using webServiceURL, how can we create the endpoint and what the body of get request will look like?
0
0
408
Mar ’24