#rafapas-elements

1 messages · Page 1 of 1 (latest)

median holly
prime python
#

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

median holly
#

yep that would be a problem.

prime python
#

ok, I have doubt of code

#

I am not sure if you can help me

cyan zephyr
#

I am happy to help. What is your issue?

prime python
#

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

median holly
#

what's your question exactly?

prime python
#

how use Elements Stripe and stripe.js here

#

in front

median holly
#

the code you shared above is our legacy Checkout product which doesn't support SCA, yes

median holly
prime python
#

of this guide

#

I dont know how made step 2

#

I havent BEFORE code

median holly
#

can you clarify?

#

are you talking about this or something else?

median holly
#

yeah the before code there is for if you're migrating from Elements, to Elements but with PaymentIntents.

#

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.

prime python
#

Ok, and you have a guide for implement Elements+PaymentIntents with examples, a simple guide

#

for I can implement this in our plugin

median holly
prime python
#

Ok, I see, exist any example with code "real" in github? that I can download and only I must change keys

median holly
#

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!

silent rock
#

@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

prime python
#

Ok, tomorrow I try write a little plugin with this samples and when works it , migrate to our plugin

#

Tomorrow can I wrote here if I have new doubts?