#wedfoo_code
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1304054290272358422
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi soma!
pi_3QIU6qAp5kugdp2K0UUBEQE3
I arrive at this point and the process stuck here
I see this is a live payment. so you would need to ask Stripe Support for help: https://support.stripe.com/contact
can you give me a moment, I think I can replicate it in test environment, I just need a moment to create the account on amazon
Sorry to keep you waiting, my colleague is coming to take the test
no worries
pi_3QIUyaAp5kugdp2K1FYn3wQ3
and with that PaymentIntent you get the exact same issue as before, with the "processing payment" error on amazon website?
yes, I mean I don't see error in creation of the intent, I can click the button on elements express checkout, I can sign in into amazon, press the button of the payment and see the screenshot I shared with you
and if you wait a little, the page continues saying "processing payment..." indefinitely?
yes exactly
production tried with 2 different amazon account
and test, 1 time
If I refrest the page I still have the same problem
and if you use your Express Checkout button to pay with another payment method, it works as expected?
Let me try, this page was created only for amazon pay
pi_3QIVKpAp5kugdp2K1IvBjqgd
same error, timeout
same error with Google Pay? so it means there's an issue with your integration. can you share your Checkout Element code?
we press pay but it doesn't work, timeout error (with google)
$payment_options = array(
'amount' => $result[0]['payment_amount'] * 100, //importo in centesimi
'currency' => strtolower($result[0]['payment_currency']),
'description' => $result[0]['payment_description'],
'capture_method' => $method,
'payment_method_types' => ['amazon_pay'], // Aggiungi questa riga
'metadata' => [
'custom' => $post_data['custom'],
]
);
$paymentIntent = \Stripe\PaymentIntent::create([
$payment_options
]);
$output = [
'clientSecret' => $paymentIntent->client_secret,
];
$method can be 'automatic' or 'manual'
can you share the frontend code?
also do you get an errors in the browser console?
function getClientSecret() {
return $.ajax({
url: '/mobile_amazon',
type: 'POST',
data: {
req: 'ajax',
token: '{param_token}',
intent: '{param_intent}'
},
dataType: 'json'
}).then(function(response) {
if (response.client_secret || response.clientSecret) {
return response.client_secret || response.clientSecret;
} else {
throw new Error('No client secret found in response');
}
}).catch(function(error) {
throw error;
});
}
async function initializeStripe(clientSecret) {
try {
var locale = getCookie('lang').substr(0, 2) || 'en';
elements = stripe.elements({
locale: locale,
appearance: appearance,
clientSecret: clientSecret
});
paymentElement = elements.create('payment', {
layout: 'accordion', ...paymentElementOptions});
paymentElement.mount('#payment-element');
expressCheckoutElement = elements.create('expressCheckout', expressCheckoutOptions);
expressCheckoutElement.mount('#express-checkout-element');
const loadingOverlay = document.getElementById('loading-overlay');
const mainContent = document.getElementById('main-content');
setTimeout(() => {
loadingOverlay.classList.add('fade-out');
mainContent.classList.add('visible');
mainContent.style.opacity = '1';
mainContent.style.display = 'block';
paymentElement.style.display = 'block';
// submitButton.style.display = 'block';
}, 2500);
// paymentElement.on('change', (event) => {
// submitButton.disabled = !event.complete;
// });
// submitButton.addEventListener("click", handleSubmit);
expressCheckoutElement.on('confirm', handleExpressCheckoutConfirmation);
} catch (error) {
showMessage("{lang_payment_initialization_error}");
}
}
actually, do you have a link where I can reproduce the issue? that might be simpler.
unfortunately it's inside a webview in the app
oh wait, then that's most likely the issue! a lot of payment methods don't work inside webviews.
you should either redirect users to their full browser, or use our native SDK for mobie apps.
ok I see
could you try the Express Checkout Element outside of a webview to see if it works?
we will proceed in this way then, we develope a redirect into a browser page
is this ok?
yes should work
happy to help ๐