Hello forum,
Hope all is great!
I have a shortcut automation which uses the transaction trigger. Since updating to ios 18 the transaction trigger does not work anymore.
Whenever a transaction is done, the “Running your automation” notification does not show up and the automation does not work.
To share with you the steps I’ve done so far:
1.Remove the automation and do it again
2.Remove the card from apple pay
3. Delete and install again the shortcut app
4. Turned on and off the phone
I can confirm the automation works on my other iPhone with the latest version of IOS 17.
Would really appreciate if anyone has any insights about that, or if this happened to you as well.
Cheers!
Dorin
Apple Pay
RSS for tagDiscuss how to integrate Apple Pay into your app for secure and convenient payments.
Post
Replies
Boosts
Views
Activity
I am getting error while await applePayClient.PostAsJsonAsync(validationUrl, validationPayload)
I am testing it on local machine. Am I even can test this on local machine or not?
Error: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
validationUrl: https://apple-pay-gateway.apple.com/paymentservices/startSession
JS
C# code:
var applePayClientHandler = new HttpClientHandler
{
SslProtocols = System.Security.Authentication.SslProtocols.Tls12 | System.Security.Authentication.SslProtocols.Tls13
};
var applePayClient = new HttpClient(applePayClientHandler);
var merchantId = "merchant.com.xxxxxx.sandbox";
var _displayName = "Sandbox";
var domainName = "xxxxxx.co";
var validationUrl = request.ValidationURL;
var validationPayload = new
{
MerchantIdentifier = merchantId,
DisplayName = _displayName,
Initiative = "web",
InitiativeContext = domainName
};
try
{
var response = await applePayClient.PostAsJsonAsync(validationUrl, validationPayload);
var merchantSession = await response.Content.ReadAsStringAsync();
return merchantSession;
}
catch (HttpRequestException httpEx)
{
// Log detailed HTTP request/response information
Console.WriteLine($"HttpRequestException: {httpEx.Message}");
if (httpEx.InnerException != null)
{
Console.WriteLine($"InnerException: {httpEx.InnerException.Message}");
}
throw;
}
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
});
};
We are getting this error when processing our registration.
Payment Services Exception Domain check failed with the following errors. No domains were registered.\nDomain verification failed for pspId=1A014B2EC09DB380EE1D51FE4D116C801F62F29D74F2D93269FE554CA2E34656 domain=patient.moolah.cc url=/.well-known/apple-developer-merchantid-domain-association errorMessage=com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 4559 path $", "statusCode": "400"}
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?
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.
no any exception message, the pay bottomsheet is disappear after i click 'pay btn'
my app is a flutter app, who can help me?
I'm trying to upload my app with Tap to Pay on iPhone functionality. However, I'm getting error message "Profile doesn't include com.apple.developer.proximity-reader.payment.acceptance entitlement." I've confirmed many times that I have the distribution profile with this capability. Any idea what might be the issue? The development environment works perfectly.
While Implementing Wallet Intent Extension, and after verification
The only message i get is
Cannot Add Card
There are no available cards to add.
Any help here is appreciated.
Iphone 14 pro.
After installing ios 18 dev beta 1, i cannot use anymore the applepay. When i put the iPhone near the pos, i double click the per button, i choose the credit card i want to use, but nothing happens. Tried to change credit card, remove card from. Wallet and re add, nothing worked.
it is a known bug ?
Anyone else ? Workaround?
I'm living in Italy
Fabrizio
Apple Pay stopped working after ios 18 beta update with Iphone 14.
Tried rebooting phone
Tried different cards
Tried toggling Bluetooth , airplane mode. everything.
The documentation says that, when calling the method canMakePaymentsWithActiveCard, the method asynchronously contacts Apple pay servers.
My question is, if I want to whitelist the Apple pay servers, should I be referring to this list?
https://developer.apple.com/documentation/apple_pay_on_the_web/setting_up_your_server#3172426
Hi.
About to start integrating Apple Pay for the first time. Other gateways I've integrated have a limit from the initial authorisation, above which you can't capture payment. E.g. customer authorizes £100, but then adds items to their order taking the value to £120. Is there such a limit with Apple Pay? Is there a workaround without having to contact the customer again.
Jon
Potential Apple Pay Notification Delay in iOS 18 Developer Beta
Users are reporting a delay in receiving purchase notifications in Apple Wallet after using Apple Pay. Transactions are confirmed within the Wallet app, but the notification arrives hours later.
As this issue is occurring on the iOS 18 developer beta, it's likely a software bug related to Apple Pay integration with Wallet.
I have reported this to Feedback.
Is anyone else having the same problem?
Hi,
I work in a ticketing company and we used Wallet passes.
Everything works great but some venues report that some qrcodes are unreadable.
I have one example. All information is present but the qrcode could not be read. We tested multiple readers.
The information in the qrcode is only numeric, so ti is not an encoding issue.
What can cause this issue ?
Hi,
I am working on an Mobile App for an Bank . And in the Card Section, they wanted to "Add to Apple Pay" button, which will add their card to the Apple wallet for Payment. I assume its kind of tokenization ?
I am not able to find the write content.
Hi,
I'm adding ApplePay to our website. It works perfectly. However, I want to hide the ApplePay button on devices that do not have an Apple Wallet configured. I am using the following code to verify this as per ApplePay documentation.
function ShowApplePayButton() {
if (window.ApplePaySession) {
if (ApplePaySession.canMakePayments()) {
if (ApplePaySession.canMakePaymentsWithActiveCard('visa') ||
ApplePaySession.canMakePaymentsWithActiveCard('masterCard')) {
return true;
}
}
}
return false;
}
This function always returns true from a Mac with no wallet configured. So the applePay button is visible on the Mac. When I click on the ApplePay button, there is no option to add or update the Wallet.
This is my ApplePay sample code
function onApplePay() {
if (!ApplePaySession) {
return;
}
var grandTotal = "10";
// Define ApplePayPaymentRequest
const request = {
countryCode: 'GB',
currencyCode: 'GBP',
merchantCapabilities: ['supports3DS'],
supportedNetworks: ['masterCard', 'visa'],
total: { label: 'Total', amount: grandTotal, type: 'final' },
requiredBillingContactFields: ["postalAddress", "name", "phone", "email"],
requiredShippingContactFields: ["postalAddress", "name", "phone", "email"]
};
// Create ApplePaySession
const session = new ApplePaySession(3, request);
session.onvalidatemerchant = async event => {
// Call your own server to request a new merchant session.
const merchantSession = await getAsync("/test/ValidateMerchant", "", "json")
session.completeMerchantValidation(merchantSession);
};
session.onpaymentmethodselected = event => {
const update = {
newTotal: { label: 'Total', amount: grandTotal, type: 'final' }
}
session.completePaymentMethodSelection(update);
};
session.onshippingmethodselected = event => {
const update = { newTotal: { label: 'Total', amount: grandTotal, type: 'final' } };
session.completeShippingMethodSelection(update);
};
session.onshippingcontactselected = event => {
};
session.onpaymentauthorized = event => {
const result = {
"status": ApplePaySession.STATUS_FAILURE
};
const payment = event.payment;
aj.post('/test/ProcessPayment', body, function (response) {
if (response.approved) {
session.completePayment(ApplePaySession.STATUS_SUCCESS);
} else {
session.completePayment(ApplePaySession.STATUS_FAILURE)
}
}, function (xhr, ajaxOptions, thrownError) {
console.log(thrownError);
}, true, 'json');
};
session.oncancel = event => {
// Payment canceled by WebKit
};
session.begin();
}
Could you please suggest a workaround to resolve this issue?
There must be some rules that determine which set of localized strings of an Apple Wallet pass (.pkpass) is used when the choice is not obvious.
For instance, I made a pass with localization folders
ko.lproj (Korean)
pl.lproj (Polish)
zh-Hans.lproj (Chinese).
If any of these languages is in my iPhone's preferred languages (Settings... General... Language & Region), then it's easy: the first one on that list is used. But what if the list does not have any of them?
When I try, it seems the Chinese localization is chosen by the Wallet app. Without the Chinese localization folder, it is Korean. If I also add
ar.lproj (Arabic)
then Arabic is chosen.
I can't discern any system here. How does Wallet choose the default localization?
The Wallet Passes docs, https://developer.apple.com/documentation/walletpasses seem to be missing any information about the features coming in iOS 18, specifically the new posterEventType, new semantic tags, and how to build out the event guide for a given ticket.
WWDC24 session: https://developer.apple.com/wwdc24/10108