#rafapas-elements
1 messages · Page 1 of 1 (latest)
@prime python sure, there are many. https://stripe.dev/elements-examples/ is a good start
ok, I tell you, the problem is that actual plugin use the method :charge
not suportted now for SCA
And I have change many files
yep that would be a problem.
I am happy to help. What is your issue?
I have this url https://stripe.com/docs/payments/payment-intents/migration#web
I must migrate plugin to new version
with support to SCA
using Stripe Elements and stripe.js
both not used in our actual plugin
/** Stripe Payment Form */
echo '<form action="'.TTTStripeCheckout_helper::getPaymentUrl($payment->checkout->hash).'" method="POST">
<script src="https://checkout.stripe.com/checkout.js" class="stripe-button"
data-key="'.$payment->public_key.'"
data-amount="'.$payment->checkout_currency['amount'].'"'.
(is_email($payment->checkout_email) ? ' data-email="'.$payment->checkout_email.'"' : ' ')
.'data-name="'.get_bloginfo('name').'"
data-description="'.$payment->checkout->description.'"
data-image="https://stripe.com/img/documentation/checkout/marketplace.png"
data-locale="auto" data-currency="eur"
data-allowRememberMe="false"
data-label="Pagar '.$payment->checkout_currency['price'].' €">
</script></form>';
this message not see pretty 😫
is the frontend to our actual plugin, that I see call to your checkout.js, showing a button in front
can you see preproduction here https://pre.caminosmadrid.es/formacion/registrate-en-trafic-gratis-hasta-el-7-de-octubre
what's your question exactly?
the code you shared above is our legacy Checkout product which doesn't support SCA, yes
you'd follow the guides at https://stripe.com/docs/payments/payment-intents/migration#web and https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements and build those flows by re-coding this plugin that you maintain!
yeah the before code there is for if you're migrating from Elements, to Elements but with PaymentIntents.
You're migrating from legacy Checkout instead (see https://stripe.com/docs/payments/checkout/migration)
there's no direct guide for upgrading from (legacy Checkout) -> (Elements+PaymentIntents) , since usually if you used Checkout in the past, the upgrade path is to use the new version of Checkout and that's what we document.
Ok, and you have a guide for implement Elements+PaymentIntents with examples, a simple guide
for I can implement this in our plugin
Ok, I see, exist any example with code "real" in github? that I can download and only I must change keys
no you can't just download a project, swap API keys and go live, that's not how it works.
There are example projects linked from that page yep (https://github.com/stripe-samples/accept-a-payment) and you can run them in test/look at them to understand the integration while you build your own versions!
@prime python just to make sure, you can't just download our example, put your own API keys and then use this in production. This is a sample, it doesn't do proper error handling and order management, you will have to write all of this end to end yourself as the developer. Like @median holly mentioned I recommend using Checkout instead, it will make your life way easier https://stripe.com/docs/payments/checkout