#luis_07716
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- luis_07716, 10 minutes ago, 6 messages
@potent sonnet Let's chat here. Please keep all messages in this thread instead of the main channel
I'm so sorry let me delete those
we have using the next code
`export async function createPaymentIntent(amount, contactId, paymentMethod) {
const paymentIntentConfig = {
amount,
currency: 'usd',
metadata: {
contactId: contactId
}
};
if (paymentMethod) {
paymentIntentConfig.payment_method_types = [paymentMethod];
}
const paymentIntent = await stripeService.paymentIntents.create(paymentIntentConfig);
return paymentIntent;
}`
and
`const pay = async (amount) => {
//stripe use cents
const donationIntent = await apiService.createDonationIntent(amount * 100, 'card');
const clientSecret = donationIntent.client_secret;
const { error } = await confirmPlatformPayPayment(clientSecret, {
applePay: {
cartItems: [
{
label: 'Donation',
amount: amount.toString(),
paymentType: PlatformPay.PaymentType.Immediate
}
],
merchantCountryCode: 'US',
currencyCode: 'USD',
requiredShippingAddressFields: [PlatformPay.ContactField.PostalAddress],
requiredBillingContactFields: [PlatformPay.ContactField.PhoneNumber]
}
});
console.log(error);
if (error && error.code !== 'Canceled') {
showErrorToast();
}
};`
already tried to change cartItems to paymentSummaryItems but it didn't work , cartItems is required
and the intent id is
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
any clue what could be doing wrong ?
And you're currently using React Native + Expo 48? Do you still see the "The payment has been canceled" message or are you seeing something else?
we are using react native + expo 48 + eas build managed , i do still see the same error The payment as been canceled
Hi 👋
I'm stepping in to offer some assistance
thank you so much!
The Payment Intent you shared was just created and now needs a payment method. What is it you are trying to do here?
trying to enable apple pay , so first in the server i create the paymentIntent and i provide the intent.client_secret to the confirmPlatformPayPayment
Lets stop right there
Do you have an Apple Pay certificate registered with Stripe?
yes
we just followed the https://stripe.com/docs/apple-pay?platform=react-native guide
with confirmPlatformPayPayment
with this config
clientSecret, { applePay: { cartItems: [ { label: 'Donation', amount: amount.toString(), paymentType: PlatformPay.PaymentType.Immediate } ], merchantCountryCode: 'US', currencyCode: 'USD', requiredShippingAddressFields: [PlatformPay.ContactField.PostalAddress], requiredBillingContactFields: [PlatformPay.ContactField.PhoneNumber] } }
And you say this works fine in the simulator. Do you mean when you run this using an iPhone emulator you see the Apple Pay button.
on iOS Simulator works ok , on TestFlight it shows that error straightAway
and in both isPlatformPaySupported always returns true
I have no experience with TestFlight. Only the iOS Simulator and actual iOS Devices. What is the difference there?
TestFlight is just the actual iOS Device the final build
Unfortunately I cannot speak to why it may not be appearing in TestFlight. Is the device properly configured with a Payment Method?