when i integrate apple pay to our website, i pass `ApplePayPaymentRequest
` like this:
const paymentRequest = {
countryCode,
currencyCode,
merchantCapabilities,
supportedNetworks,
total: {
label: "Demo (Card is not charged)",
amount: totalAmount,
type: "final",
},
requiredBillingContactFields: [
"postalAddress",
],
requiredShippingContactFields: [
"postalAddress",
],
shippingContact: {
addressLines: ['402 Vinnie Brooks Suite 707'],
administrativeArea: "NB",
country: "Canada",
countryCode: "CA",
emailAddress: "qqq@qq.com",
familyName: "gfhh",
givenName: "dfg",
locality: "W*********h",
phoneNumber: "6******7",
postalCode: "M*****4",
},
};
but when apple pay sheet show, the shippingContact dispaly like this (it just show user name, not show the details):
should i do what in order to display the details of the shippingContact, please help me. Thanks.
Apple Pay
RSS for tagProvide a fast, easy, and secure way for users to buy goods and services in your app or on your website using Apple Pay.
Posts under Apple Pay tag
162 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
Hello! I am trying to test Apple Pay integration on my Websites. I have followed every step in this guide:
Created a sandbox test account
Signed out of the original apple id and logged into the sandbox test account
Added a test card number
But now when I click on the payment, it pops up "Apple Pay is not available for this website"
This is my apple pay session.
"applePaySession": {
"epochTimestamp": 1722238930083,
"expiresAt": 1722242530083,
"merchantSessionIdentifier": "SSHAFB91E9B24D34819983B9BFC42A00B41_A0E617ED4A56A343E07C6E1255BD4098423B3A8E1243236462D07B14B4A0F7C3",
"nonce": "47723e6b",
"merchantIdentifier": "83DCF5597D4E94ABC7297F3489E4D5C4655CFDEB711EFA6FEB85E39FD86FD1E1",
"domainName": "dev-d8okw12xt.hoobuy.com",
"displayName": "Hoobuy.com",
"signature": "30***",
"operationalAnalyticsIdentifier": "Hoobuy.com:83***",
"retries": 0,
"pspId": "1A25***"
}```
Hi there,
We're experiencing difficulties setting up Apple Pay for our native macOS app written in Swift. The main issue seems to be with the "Apple Pay Merchant Identity" configuration.
When setting up the Merchant ID on the Apple Developer portal (https://developer.apple.com/account/resources/certificates/list), the only available platform listed is iOS. There's no option for us to add macOS to the supported platforms.
Our app uses PKPaymentAuthorizationController to present the Apple Pay sheet, but it fails immediately with a "Payment Not Completed" error. The macOS Console.app shows:
com.apple.PassKit.PaymentAuthorizationUIExtension - Payment failed with fatal error <private>
PKPeerPaymentService XPC Error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.passd.peer-payment was invalidated: failed at lookup with error 159 - Sandbox restriction." UserInfo={NSDebugDescription=The connection to service named com.apple.passd.peer-payment was invalidated: failed at lookup with error 159 - Sandbox restriction.}
We've verified that our code works correctly on iOS, but we can't get it functioning on macOS. It seems like adding Apple Pay to a macOS app might not be fully supported, although the developer docs outline support for macOS.
Additionally, we suspect this could be an issue with sandboxing.
Are there additional steps or configurations required for Apple Pay on macOS that differ from iOS? Any guidance on properly setting up Apple Pay for a native macOS app would be greatly appreciated.
I'm developing an App Clip to add cards to Apple Wallet,and I want to check if card already added to PassKit library.For example, to show "Apple Pay enabled" checkmark on a card's UI.
when I call these codes:
PKPassLibrary *passLibrary = [[PKPassLibrary alloc] init];
NSArray<PKPass *> *paymentPasses = [passLibrary passesOfType:PKPassTypePayment];
the paymentPasses returns an empty array.I want to know if App Clip can access passes, and how can I get the entitlements to query the pass library.
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.
We are programming a marketplace for digital artwork, which shall use in-app purchases. Are we allowed/supposed to create only one storekit product, which we can call "item-x" and assign a fix price of i. e. 5,00$, assuming all items are sold for 5,00$, and use this product for all items? Or shall we create one product for each item which is selled on or platform, which could be 1.000?
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
I have a merchantId which from Buckaroo.
it is return false when I call canMakePaymentsWithActiveCard
I also have an merchantId which from Apple directly.
it is return true on sandbox test account.
The merchantId from buckaroo return true. when we test it on Mobile with real account.
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?
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?
We want to use HCE or Wallet to use the iPhone on NFC readers that start EV chargers. They use the same tech as transit systems (MiFare and ISO 14443-4), but the backend systems only use the NFC UID for verification.
Is it possible to use HCE (CardSession) or Wallet (Transit card) to transmit a static UID?
If so, could our use-case go under either In-store purchase, loyalty programme, or transit? Or are those categories very rigid as to their use case?
The new EEU regulation seems to open up this a bit.
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.
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?
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/
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?
My company rebranded and we need to update our merchant name that displays when a user makes a purchase with their Apple Wallet. The merchant name displays correctly on bank statements, but still reflects the old name within apple wallet.
I can't seem to find where the actual display name for the merchant is set or updated. Any insights here would be helpful!
The language I use is golang. I am a backend developer. I would like to ask, when a client purchases a product and receives an Apple receipt, what should the subsequent process be like?
I am currently testing Apple Pay integration on my sandbox environment and I am in need of test cards for failed cases such as insufficient balance. Does anyone have access to or know where I can find Apple Pay test cards specifically for scenarios where transactions fail due to reasons like insufficient balance? Any help or guidance on this matter would be greatly appreciated. Thank you.
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
Diagnose errors that occur when processing Apple Pay payments,
identify common causes, and explore potential solutions.
View Technote TN3176 >