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

Problem integrating In-app Purchase using revenue cat
After setting up the code and panel as per the documentation of app store connect and revenue cat, when I try to fetch the product from my app, it shows following error: PlatformException(2, There was a problem with the App Store., {readable_error_code: STORE_PROBLEM, userCancelled: false, underlyingErrorMessage: An unknown error occurred, code: 2, message: There was a problem with the App Store., readableErrorCode: STORE_PROBLEM}, null)
0
0
172
Jul ’24
Apple wallet NFC pass with personalization
We now want to take this a step further adding Rewards Enrollment via the terminal. So scenario is: customer pays with apple pay on adyen terminal we check if the customer has the NFC pass in the wallet if so, they earn points (regular flow which is working) if not, wallet asks if you want to onboard into the program. We use personalization.json for for this and a webservice from us We have everything setup, but the personalization isn’t working. We follow all these steps: https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/PassKit_PG/PassPersonalization.html The issue is that we never receive a POST request from wallet on the /personalize route we needed to set up. It simply never triggers. We tried to do it manually from wallet using the ‘Add Personal Info’ button that appears now (because we added personalization.json to the pkpass bundle), but this triggers a message ‘Unable to personalise pass’, while it should show the personalization fields with our logo on top. See 2 attchements, one with the error, second one how it should look after clicking the ‘Add Personal Info’ button.
3
1
384
Jul ’24
How to decrypt RSA version of Apple Pay PaymentToken in java
is there any avaiable demo for java? Acutally, i use code below to decrypt wrappedKey : Cipher oaepFromInit = Cipher.getInstance("RSA/ECB/OAEPWithSHA-256AndMGF1Padding", new org.bouncycastle.jce.provider.BouncyCastleProvider()); OAEPParameterSpec oaepParams = new OAEPParameterSpec("SHA-256", "MGF1", new MGF1ParameterSpec("SHA-1"), PSource.PSpecified.DEFAULT); PKCS8EncodedKeySpec pkcs8KeySpec = new PKCS8EncodedKeySpec(privKey); KeyFactory keyFactory = KeyFactory.getInstance("RSA"); Key privateKey = keyFactory.generatePrivate(pkcs8KeySpec); oaepFromInit.init(Cipher.DECRYPT_MODE, privateKey, oaepParams); return oaepFromInit.doFinal(wrappedKeyBytes); But this code can't decrypt wrappedKey, always occur error: Exception in thread "main" org.bouncycastle.jcajce.provider.util.BadBlockException: unable to decrypt block at org.bouncycastle.jcajce.provider.asymmetric.rsa.CipherSpi.getOutput(Unknown Source) at org.bouncycastle.jcajce.provider.asymmetric.rsa.CipherSpi.engineDoFinal(Unknown Source) at javax.crypto.Cipher.doFinal(Cipher.java:2168) at Caused by: org.bouncycastle.crypto.InvalidCipherTextException: data wrong at org.bouncycastle.crypto.encodings.OAEPEncoding.decodeBlock(Unknown Source) at org.bouncycastle.crypto.encodings.OAEPEncoding.processBlock(Unknown Source) ... 5 more publicKeyHash value match my publicKey and privateKey, and I can use my publicKey and privatekey to encrypt and decrypt my own text in same algorithm.
0
0
412
Jul ’24
Apple Pay SDK Payload Decryption Sometimes Fails on Occation
Good day, A few months ago, we started noticing that we are getting occasional ApplePay SDK Data decryption errors when we attempt to decrypt the SDK Data payload that comes back from the ApplePay SDK. We are using the C# BouncyCastle Dotnet package to handle the EllipticCurve decryption. We find on average that about 2% of all our deposits are failing because the library fails to decrypt the ApplePay SDK Data payload with the error: "Mac check in GCM failed". It appears like ApplePay is maybe sending faulty payloads to us on occasion? Unless there is an issue with the BouncyCastle library? This is causing only a few transactions to fail per day, but we still need a solution for this. Is anyone having the same issue or is there a contact from Apple I can get in touch with directly to share examples to assist with troubleshooting this? Kind regards, Reon Fourie
2
0
466
Jul ’24
merchant : Verification failed for domain
Hi , I'm trying to verify my domain , I uploaded the verification file and when I open the file by browser it works.But the verification status remains “Pending”. My domain has a firewall and is whitelisted, perhaps the request from Apple was intercepted? 17.0.0.0/8 has already been activated in the whitelist. How can solve this problem?
1
0
437
Jul ’24
In-App Provisioning:: Explicit App ID prefix
Hello, In the wallet implementation guide there's note: ‘ Note If the issuer uses an explicit App ID, it may not match their developer account Team ID. See Developer Account Help for more information.` Does an explicit App ID prefix (different from the current team id) impact in any way the app's integration with Apple Pay? Should the app switch to the default TeamID prefix?
0
0
181
Jul ’24
Apple pay web authentication failed (SSL connection)
I have setup the server settings TLS, HTTPS I have performed the following steps but not working for me: 1. I have validated my domain 2. Generate Certificate Signing Request (CSR) using keychain. It created public and private key in MAC keychain 3. Uploaded CSR (from point 2) to apple Pay Merchant Identity Certificate. It gave me merchant_id.cer 4. Generated .p12 with merchant_id.cer, public and private key using keychain Now I am using this .p12 to create the ApplePaySession (paymentSession) using server side code in C# but getting error from apple side. Exception: The SSL connection could not be established Inner Exception: Authentication failed, The credentials supplied to the package were not recognized at System.Net.SSPIWrapper.AcquireCredentialsHandle Sample Code: var request = new MerchantSessionRequest() { DisplayName = "StoreName", Initiative = "web", InitiativeContext = "applepaypoc.xxxxxx.com", MerchantIdentifier = "merchant.com.xxxxxx.applepaypoc", }; string certPath = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot\\files", "NewP12.pfx"); X509Certificate2 certificate = new X509Certificate2(certPath, "xxxxx"); HttpClientHandler handler = new HttpClientHandler(); handler.ClientCertificates.Add(certificate); handler.SslProtocols = System.Security.Authentication.SslProtocols.Tls12; var resCode = string.Empty; using (HttpClient client = new HttpClient(handler)) { try { HttpResponseMessage response = await client.PostAsJsonAsync(request.ValidationURL, validationPayload); response.EnsureSuccessStatusCode(); resCode = response.StatusCode.ToString(); string responseBody = await response.Content.ReadAsStringAsync(); return responseBody; } catch (HttpRequestException e) { return $"resCode = {resCode} ///// Response Message: {e.Message} ///// Response Inner Exception: {e.InnerException.Message}"; } } **Ref: ** https://developer.apple.com/documentation/technotes/tn3103-apple-pay-on-the-web-troubleshooting-guide https://tech.justeattakeaway.com/2016/10/10/bringing-apple-pay-to-the-web/
2
0
699
Jul ’24
Not able to make payment to apple using test cards.
Im trying to do the payment using authorize.net through react native framework. I have registered the merchant ID in application and replaced merchant identifier in below code. Below i have posted my code that I'm trying to do the payment and I'm using the cards that are provided in this link. I can able to add one card and at the end step its trying for payment and its failing.Please help me out .Thanks.
2
0
387
Jul ’24
Apple pay - determine active card
The documentation states canMakePaymentsWithActiveCard is deprecated but will continue to work on Safari browsers. The suggested method to use applePayCapabilities is in Beta. This is confusing for a developer! which method should be used. I do not want to use a 'Beta' version in a Production environment. On the other hand, I also don't want to use a method which is deprecated. Any help or guidance would be welcome. Thank you
1
0
542
Jun ’24
PayWithApplePayButton SwiftUI API
During the WWDC2022 talk "What's new in Apple Pay - WWDC2022" the new SwiftUI implementation of Pay with Apple Pay was introduced. During the talk only a code snipped is shared (screenshot). Is there any example app or reference code that uses the APIs? Especially: PayWithApplePayButton and PayWithApplePayButtonPaymentAuthorizationPhase Link to the talk: What's new in Apple Pay - WWDC2022
0
0
324
Jul ’24
Q: what enrollment or application needed to implement Apple Access with Express Mode?
Hi. I'm planning of creating a system for in-office access control that allows putting employee ID card in Apple Wallet to unlock the door without unlocking iPhone, something like HID Global's Employee Badge in Apple Wallet. I searched and it seems that Apple Access is suitable for unlocking the office door, but I couldn't find any relevant development documentation. What kind of enrollment or application is required to put my employee ID card in Apple Wallet with Apple Access and use Express mode? Also, could one share any related development documents please? Thank you in advance.
0
0
352
Jul ’24
How developer will get to know which card type user (Amex, visa, discovery) has selected in swift?
is am using This delegate method, but i am getting type of card(debit/credit) info i want to know this card is from mastercard / visa or amex. func paymentAuthorizationController(_ controller: PKPaymentAuthorizationController, didSelectPaymentMethod paymentMethod: PKPaymentMethod) async -> PKPaymentRequestPaymentMethodUpdate { print(paymentMethod.displayName ?? "") return PKPaymentRequestPaymentMethodUpdate(paymentSummaryItems: payemntRequest.paymentSummaryItems) }
1
0
330
Jun ’24
3DS - Apple Pay
Hello! I have a question regarding the Apple Pay payment method. We're adding this payment method to our app and noticed that during the initiation of a transaction, i.e., when invoking Apple Pay to reserve a product in our app, the 3DS verification doesn't occur. Our assumption was that 3DS happens when a card is added to the Apple Pay wallet, which is before the user purchases a product. But is that correct? Shouldn't 3DS be processed each time a transaction is initiated? If the case where a transaction happened for a card where the 3DS authentication is completed when it was added, will the liability shift for this transaction from us as merchant to the bank as well, like regular 3DS auth on a transaction basis would do?
1
0
863
Jul ’24
Apple Pay - Payment Processing Certificate
Hey there, I have a question about the Payment Processing Certificate. Does this certificate need to be in an account that is only using Push Provisioning in the apps? We don't have any payments being made in app. Do the Wallet app use this certificate to make the payments? Or only stores uses it to make in-app payments? The final question is: can we remove this certificate?
1
1
588
Jul ’24
appStoreReceiptURL length
Hello, I have a question to consult. My app includes app purchase, and I will receive the receipt after the purchase. During the testing process, it was found that with the increase of orders without "Finish" (simulating the situation of a user's order loss), the length of receipt would also increase. At present, our test account contains a maximum of 10 orders that are not "finished", and the length of "receipt" is increased from the first voucher length: [12812 characters] [9609 bytes] to the tenth voucher length: [17220 characters] [12913 bytes], currently we are testing in a sandbox environment. My question is whether there is a maximum length limit for the field receipt in a formal environment, and if so, what is the maximum length?
1
0
266
Jul ’24
apple pay and in app purchases
Hello, I‘m a developer and I want to integrate apple pay to my app but I don’t want to pay the 30% charges (in fact I can’t because if apple does I’m in deficit i’ll explain below) My app is a ticketing app for events like parties, gigs, etc… and I don’t know if it is eligible for not using iap but apple pay (like that I’m not charged 30%). I’m also using a third party payment provider. In my case is it authorized by apple? I was saying I’m in deficit if apples charges me 30% because when a user buys a ticket I keep around 3% of the ticket and the rest goes for the organization of the event. If apple takes 30% I’ll not be able to fit in my prices. Lastly, if I’m eligible to using only apple pay and not iap, how do I say to apple « hey I don’t want to use iap but just apple pay ». Is it in the apple store connect panel? Or it has to be declared somewhere else?
0
0
376
Jul ’24
Custom Push Notifications for Apple Wallet Pass Not Received
Hello everyone, I'm having trouble with sending custom push notifications for Apple Wallet passes. Here's what I've done so far: Registered a new pass: I receive a deviceToken for the pass. Enabled Push Notifications: Push notifications for the Apple Wallet app and the specific pass are enabled on my phone. Added the Key for Push Notifications: I've added the necessary key for push notifications. I use following code to send the message via APNS: const tokenKey = fs.readFileSync(options.tokenPath).toString(); jwtToken = sign({}, tokenKey, { algorithm: 'ES256', expiresIn: '1h', issuer: options.teamId, header: { alg: 'ES256', kid: options.keyId } }); const client = http2.connect('https://api.push.apple.com:443'); const notificationPayload = JSON.stringify({ aps: { "alert" : "Hello" } }); // and try //{ // "aps": { // "alert": "Your pass has been updated!", // "sound": "default" // }, // "pass-type-identifier": "pass.com.example.myPass", // "serial-number": "123456789", // "device-token": "<deviceToken>" //} const request = client.request({ ':method': 'POST', ':path': `/3/device/${deviceToken}`, 'apns-topic': topicId, 'apns-push-type': 'alert', 'authorization': `bearer ${jwtToken}`, 'apns-priority': 10, 'content-type': 'application/json', 'content-length': Buffer.byteLength(notificationPayload) }); return new Promise((resolve, reject) => { request.on('response', (headers, flags) => { for (const name in headers) { console.log(`${name}: ${headers[name]}`); } }); request.on('data', (chunk: string) => console.log(chunk)); request.on('end', () => { client.close(); resolve(); }); request.on('error', (err) => { console.error('Error sending push notification:', err); reject(err); }); request.write(notificationPayload); request.end(); }); When I send the message, I receive a :status:200 and a apns-ID, indicating that the message has been sent. However, I do not receive the custom push notifications on my phone. The pass updates are received without any issues, but the notifications are not. Has anyone encountered this issue or know if it's possible to send custom push notifications for Apple Wallet passes in this manner? Any guidance on how to resolve this issue would be greatly appreciated.
1
0
597
Jul ’24
Tap to Cash Documentation?
Is there any documentation on the annouced Tap to Cash feature from WWDC24? Will there be a way for developers to tap into this feature from within their own apps? I've searched around the documentation and info released during the conference and I haven't found anything.
2
0
378
Jul ’24