#birendar-singh_api
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/1276045841299410947
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hello! you should be using either Checkout, Elements, or our mobile SDKs to collect payment information and transmit it directly to our servers. We strongly recommend that all users integrate with these methods. https://docs.stripe.com/payments/online-payments
Can I handle recurring payments on my server later using this method?
I mean using stripe charge Id.
If you have already saved the payment method, you will have a PaymentMethod id. You can use that PaymentMethod id to make an off-session payment at a later point in time.
- https://docs.stripe.com/payments/save-and-reuse
- https://docs.stripe.com/payments/save-during-payment
If you're talking specifically about Subscriptions, this is the guide you'll want to refer to : https://docs.stripe.com/billing/subscriptions/build-subscriptions
Okay, let me review the document above and get back to you.
It seems like there are significant changes on our application end.
Currently, we are following the steps below:
Step 1: Generating a Token
\Stripe\Stripe::setApiKey($StripeSecretKey);
$token = \Stripe\Token::create(
array(
"card" => array(
"number" => Yii::$app->Inline->validcardnumber($cardetail['cardnumber']),
"exp_month" => $cardetail['exp_month'],
"exp_year" => $cardetail['exp_year'],
"cvc" => $cardetail['cvc'],
"address_zip" => isset($cardetail['zipcode']) ? $cardetail['zipcode'] : "",
)
)
);
Step 2: Creating a Customer:
$productName = isset($customerDetail['product_name']) ? $customerDetail['product_name'] : 'NetizensBank';
\Stripe\Stripe::setApiKey($StripeSecretKey);
$customer = \Stripe\Customer::create(array(
"source" => $customerDetail['token'],
"email" => $customerDetail['stripeEmail'],
"description" => $productName,
));
Step 3: Charging the Payment
$charge = \Stripe\Charge::create(array(
"amount" => $amount, // Amount in cents
"currency" => isset($paymentInfo['currency_code']) ? $paymentInfo['currency_code'] : 'usd',
"customer" => $paymentInfo['stripe_customer_id'],
"description" => isset($paymentInfo['product_name']) ? $paymentInfo['product_name'] : 'NetizensBank',
"statement_descriptor" => $productname2
));
For recurring payments, we are using the Stripe customer ID:
/*
- For a new Stripe charge
*/
$charge = \Stripe\Charge::create(array(
"amount" => $amount, // Amount in cents
"currency" => isset($paymentInfo['currency_code']) ? $paymentInfo['currency_code'] : 'usd',
"customer" => $clientCustomerId->stripe_customer_id,
"description" => "Netizensbank Invoice",
"statement_descriptor" => "Netizensbank Invoice",
));
Due to recent changes in Stripe, we are unable to generate tokens. Additionally, we have many users who have their own Stripe accounts.
I appreciate it if you could provide a quick solution to resolve this.
Can you share your account id so that I can take a closer look at how your integration works? You can find your account id by logging in to https://dashboard.stripe.com/settings/account. It'll look like acct_123
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Account ID: acct_1N64u4SJ1CZHGWkH
Error
It was working fine before.
Based on my understanding of the issue, we need to enable 'raw card data,' but this requires a lot of details, and many of our clients are unable to enable it. Therefore, I am looking for a solution on our code end.
you mentioned that this is due to recent changes in Stripe, but from that account id, i don't see any live charges that use raw card data
are you using a different account for the charges that you say support raw card data?
to be clear, you must be provide those information listed in the support site article in order to support raw card data. There's no way around this
if what you mean is you're using Checkout, or Elements to generate the payment method (a.k.a token), yes, it will work. As long as you're not handling raw card data on your own
Okay, could you please provide the documentation link? I'll test it quickly.
this is a general guide for accepting payment :