#sg-pushpaveni_code

1 messages ¡ Page 1 of 1 (latest)

orchid walrusBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1257575278880755743

📝 Have more to share? Add details, code, screenshots, videos, etc. below.

blissful basin
#

No you don't need to migrate the use of SetupIntent APIs.

leaden yarrow
#

thanks for information

#

And about the Migration Step 2:
Step 2: Collect payment details on the client side
Use the confirmCardPayment function, which collects the payment information and submits it directly to Stripe.

#

We are not using Stripe.CreateToken already, it seems that we not collecting the payment in the client end

#

we use the below code to call the server side code as below

SEPA JavaScript:
// Note: this merchant has been set up for demo purposes.
var stripe = Stripe(stripePublishableAPIKey, { locale: 'auto' });

// Create an instance of Elements.
var elements = stripe.elements();
// Create an instance of the iban Element.
var iban = elements.create('iban', {
style: style,
supportedCountries: ['SEPA'],
});

// Add an instance of the iban Element into the iban-element <div>.
iban.mount('#iban-element');

iban.on('change', function (event) {
// Handle real-time validation errors from the iban Element.
// Display bank name corresponding to IBAN, if available.
});
stripe.createSource(iban, sourceData).then(function (result) {
if (result.error) {
// Inform the customer that there was an error.
} else {
// Send the Source to your server to create a charge.
ChargeSEPA(result); // Ajax call to server API to get the charge
}
});

blissful basin
#

I saw you are still using createSource in the your code

leaden yarrow
#

yes, kindly guide us to migrate this code block to the relevant latest code

blissful basin
leaden yarrow
#

is it possible to have a call with you now to discuss on the changes to done towards migration????

blissful basin
#

Not possible I'm afraid. I can only support you through chat.

leaden yarrow
#

we will try these steps

#

Stripe.Charge charge = new Stripe.Charge();
StripeConfiguration.ApiKey = StripeSecretApiKey;
var optionscharge = new ChargeCreateOptions
{
Amount = Convert.ToInt32(Convert.ToDecimal(Amount) * 100),
Currency = OrderCurrencyType,
Customer = Token,
Source = PaymentMethodId
};
var services = new ChargeService();
charge = services.Create(optionscharge);

we are using the abvoe code to get the charge
can we use this same code???
will it need be migrated ???

blissful basin
#

No you shouldn't use Charges API anymore, you should use PaymentIntents API instead.

leaden yarrow
#

kindly share the reference for the above code with payment indent api

blissful basin
leaden yarrow
#

we will check out this and come back to you later

#

thanks for support

#

will you be available for us to clarify later today or someone else ???

blissful basin
#

Discord server is usually available 24/5. The thread will be closed after some time, feel free to use the button on #help to create a new thread and someone from Stripe will help you.