#sg-pushpaveni_code
1 messages ¡ Page 1 of 1 (latest)
đ 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.
No you don't need to migrate the use of SetupIntent APIs.
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
}
});
I saw you are still using createSource in the your code
yes, kindly guide us to migrate this code block to the relevant latest code
https://docs.stripe.com/payments/sepa-debit/set-up-payment can you I suggest you to follow this guide instead?
is it possible to have a call with you now to discuss on the changes to done towards migration????
Not possible I'm afraid. I can only support you through chat.
ok fine
give me a minute to check it out
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 ???
No you shouldn't use Charges API anymore, you should use PaymentIntents API instead.
kindly share the reference for the above code with payment indent api
https://docs.stripe.com/payments/save-and-reuse?platform=web&ui=elements#charge-saved-payment-method