#vinod_api
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/1304345423745388594
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi @daring barn
Can you help me with the paypal integration
@elder anchor can you please request @daring barn to reply me?
There's no need to tag me in every message, I'd get back to you eventually
I'd suggest you to get started by following this doc https://docs.stripe.com/payments/paypal
Yes I have gone through that, and have added the Paypal method in my stripe dashboard
When I visit my payment page in desktop I can see "Pay with Link"
if I were to use my mobile I can see Gpay
here's my payment page https://arbortech.alykatest.com.au/de/shop-online/payment
but I can;t see Paypal payment button
Can you share with me the PaymentIntent ID?
And looks like you are using Card Element, not PaymentElement in your page. Card Element doesn't support Paypal
I don't have a PaymentIntent ID yet
I have card element, I also have the following code so it can show the available payment buttons
let me provide you the code
As I said, card element doesn't support Paypal, you should use Payment element,
var settings = {
"url": "/aapi/stripe/getcartdetail",
"method": "GET",
"timeout": 0,
"headers": {
"shoppingguid": $('#shoppingguid').val()
}
};
$.ajax(settings).done(function (response) {
console.log(response);
var requestCountry = response.country;
var requestCurrency = response.currency;
var requestAmount = response.amount;
var requestJson = {
country: requestCountry,
currency: requestCurrency,
total: {
label: "Total",
amount: requestAmount
}
};
var paymentRequest = Alyka.Stripe.Cache.$stripe.paymentRequest(requestJson);
var elements = Alyka.Stripe.Cache.$stripe.elements();
const prButton = elements.create("paymentRequestButton", {
paymentRequest: paymentRequest
});
paymentRequest.canMakePayment().then(function (result) {
if (result) {
prButton.mount("#awpaymentrequest");
} else {
$("#applepayrow").hide();
$("#awpaymentrequest").hide();
// $('#awstripeapplepayerror').append('apple pay unavaliable<br>');
// $('#awstripeapplepayerror').show();
}
});
var elements = Alyka.Stripe.Cache.$stripe.elements();
const prButton = elements.create("paymentRequestButton", {
paymentRequest: paymentRequest
});
is this not creating a Payment element?
No, that's payment request button for Link, Apple Pay and Google Pay
I see
if I were to use Payment Element, do the customers redirect to Stripe payment page, do the payment and redirect back to my site?
at the moment using Card Element, customer stay on our website
Yes, your customer will be redirected back
Does that mean my code must be changed right?
I mean I had to migrate from "Card Element" to Payment Element
does Link supported by Payment Element?
at the moment my website payment page intializes Card Element and Payment Request buttons seperately
Can you please recommend what's the proper way to handle my situation?
https://docs.stripe.com/payments/payment-element/migration you can follow this guide to migrate to payment element
We support Card, Gpay, ApplePay, Link and may accept more payment methods in future
Paypal
https://docs.stripe.com/payments/payment-element and read this to learn more about payment element.
Payement element supports all these payment methods that you listed.
https://docs.stripe.com/payments/payment-methods/payment-method-support#product-support refer to this page for the complete list of payment methods that payment element supports
thank you
can you please confirm one more thing?
so if I were to use Payment Element, then all the supported Payment Methods will be loaded on website payment page https://arbortech.alykatest.com.au/de/shop-online/payment?
??
Can you please help me understand how the user will be with Card vs Paypal
You can visit https://docs.stripe.com/payments/payment-element to see how payment element display various payment methods
The reason why I am asking these question is,
my client doesn't like to redirect to other website
doen't like the look, it doen't match our website branding(theme)
https://docs.stripe.com/elements/appearance-api?platform=web you can customize the look and feel
yeah I saw that, that's good
so choosing Card over the Payment Element, will the customer redirect to stripe payment page?
Yes and I believe I've already answered the same question.
Thanks Jack, I think I will have to paly with my javascript
please keep this thread open, if I have any questions further so I can reach out
The thread will be closed after some time. Feel free to create a new thread from #help
that's fine thank you