#sainita_google-pay-invalid-pk
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/1339268762775584839
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Is this a public url I can check?
It's a public url but you need submit a form to get this page
Let me share the details
This is the url : https://demo-app.blinkpayment.co.uk/
In server field add this : https://dev.blinkpayment.co.uk/
Explore the possible. Payment wizardry- The quick, easy and secure way to get paid. Blink gives you the ability to hone
all the payment processing needs of your business within one portal. Process payments via the virtual terminal send
payment links via email, SMS or invoices, create Direct Debits and repeat transactions.
API key : 490bcf4576104e2fb55c813e353199b7aa0ee864848252950e5c85ed369042a6
secret Key : 7aa5b840a1c27c82827aef1f8da12a18509d65b2cb9b6c7c5f72bca11fe1c5ad
currency : GBP
Select "pay with stripe" radio button and hit submit
You should get the form where these buttons are displayed while clicking "see more"
after filling customername and email if I click on google pay button and choose the card then I am getting this error
payment is also failed
Do you see Test environment. Card and address fields are pre-filled with fake test data. in the google pay modal though?
Ok I got the same error
I have checked the api key. It's the correct one pk_test............
Can you share the client side code you're using here?
Yes
var stripe =Stripe(apiKey,{
'stripeAccount': document.querySelector('input[name=stripe_account_id]').value
});
const expressCheckoutOptions = {
buttonType: {
googlePay: 'buy'
},
buttonTheme: {
googlePay: 'black'
}
};
const elements = stripe.elements({
mode: 'payment',
amount: $("input[name=stripe_amount]").val() * 100,
currency: $("input[name=stripe_currency]").val(),
});
const expressCheckoutElement = elements.create(
'expressCheckout',
expressCheckoutOptions
);
expressCheckoutElement.mount('#PayByStripeGooglePay');
expressCheckoutElement.on('click', (event) => {
if ($('input[name=customer_name]').val() == '' || $('input[name=customer_email]').val() == '') {
alert('Customer name and email are required');
return;
}
const options = {
business: {
name: $('input[name=page_url]').val()
},
emailRequired: true
};
event.resolve(options);
});
const handleError = (error) => {
const messageContainer = document.querySelector('#error-message');
messageContainer.textContent = error.message;
}
expressCheckoutElement.on('confirm', async (event) => {
const {
error: submitError
} = await elements.submit();
if (submitError) {
alert(submitError);
return;
}
const clientSecret = $('input[name=google_pay_payment_intent_client_secret]').val();
const {
error
} = await stripe.confirmPayment({
elements,
clientSecret,
redirect: 'if_required',
confirmParams: {
return_url: $('input[name=return_url]').val(),
},
});
if (error) {
var paymentIntentId = $('input[name=s_intent]').val();
var success = false;
postPayment(paymentIntentId, success);
} else {
var paymentIntentId = $('input[name=s_intent]').val();
var success = true;
postPayment(paymentIntentId, success);
}
});
Ok so you're also passing a stripe account header. Can you verify the accountID specified in stripeAccount matches what's being set on the payment intent?
ok checking
You will get the payment intent id from the field s_intent.. Please inspect the form andyou will see the value of s_intent which is the payment intent value and account id is also mentioned there
@midnight comet did you check the stripeAccount param?
If that's not it I'm not really sure what else to suggest. You'll have to write into support so we can investigate this async
I am checking it
Publishable key should match the one belonging to acct_1MmGiGHMOCsDa4Df and the stripeAccount should be set to acct_1O5RR7Hcs8fOq1ZE
yes stripe account is set to this one .. acct_1O5RR7Hcs8fOq1ZE
Hello @midnight comet, we have sent you a direct message, please check it at https://discord.com/channels/@me/1339281037129420830
- 🔗The message has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.
ok