#sinduri_stripe-js-parameters
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/1229751142666469396
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- sinduri_code, 1 hour ago, 35 messages
- sinduri_code, 3 hours ago, 65 messages
- sinduri_code, 1 day ago, 14 messages
Hello there! What you have tried should of worked:
Stripe(eh_stripe_val.key, {
apiVersion: eh_stripe_val.version,
stripeAccount: acct_1K6RgqSB9POxYCQZ
})
What was the issue when you used that?
ReferenceError: acct_1K6RgqSB9POxYCQZ is not defined
received the above error from Stripe
Well it expects a string, so you need to pass it as such: 'acct_1K6RgqSB9POxYCQZ'
Otheriwse it's looking for a variable named acct_1K6RgqSB9POxYCQZ
sinduri_stripe-js-parameters
One more question
In my WooCommerce plugin , I create payment method using Stripe js, but now I want to create using PHP sdk(server side),
https://docs.stripe.com/api/payment_methods/create, but in this doc we need to pass card number, expriy and cvv, but how to get these values in server side, becuase stripe create elements is in client side using stripe.js
You shouldn't be using that API really. It doesn't support 3DS/authentication and by proxy requires raw card data (which you shouldn't be handling). Instead you should be using a Setup Intent to save payment details collected with Elements: https://docs.stripe.com/payments/save-and-reuse
I dont understand, I've integrated Stripe card payment using payment method API, customer. API and then payment intent API
Also my integration relays on card element, not payment element
Yeah I mean that is fine, but you can't tokenise server-side like you want to
Setup Intents work with Card Element too: https://docs.stripe.com/js/setup_intents/confirm_card_setup
What would be the flow, previously I've created payment method and customer and pass those to payment intent API
The doc I linked previously has the flow. Generally:
- Create a Customer and Setup Intent server-side
- Return the
client_secretto your front-end - Initialise the Card Element, collect card details
- Call
confirmCardSetup
Depends on what it is you're doing. A Setup Intent saves a card, no payment
The flow is generally the same, intent type interchangeable
Okay
In a Payment Intent scenario, the charge would happen on step 4 assuming success
Okay
One more question, Our plugin now migrate to Stripe app oauth authentication step
So customer click the app install link from our plugin settings page, then redirect to their stripe account and install our Stripe app, then return back to the redirect URI and Stripe return few tokens
account id, publishable key, Access and refresh token.
Can you confirm Stripe js initialisation is using this publishable key and account id and Server side API call authorization using access token?
You should be using the publishable key of your platform (Stripe App publisher), not the account that installed the app
Same for server-side, see: https://docs.stripe.com/stripe-apps/build-backend#authenticate-requests
But in doc
Then I guess that works too sure
should I use this publishable key, or key of Stripe app publisher as you said?
I guess the one returned