Stripe payment error (You must supply either a card or a customer id) using Laravel
Date : March 29 2020, 07:55 AM
I think the issue was by ths following , Edit 2: you have used secrete_key in Stripe::setApiKey(Config::get('stripe.secrete_key')) - should it be secret_key ? Edit 1: the only difference between your billing.js and laracasts' is a space between the two closing brackets at the end of Stripe.createToken: Stripe.createToken(this.form, $.proxy(this.stripeResponseHandler, this) );
public function createStripeCustomer($email, $token)
{
$key = Config::get('stripe.secret');
Stripe::setApiKey($key);
$customer = Stripe::customers()->create([
'card' => $token,
'email' => $email,
'description' => 'desc'
]);
// error checking
return $customer['id'];
return Stripe_Charge::create(
[
'amount' => 1000, // $10
'currency' => 'usd',
'customer' => $customer['id'],
'description' => $data['email'],
'card'=>$data['token']
]);
|
Stripe Payment: Getting Error as Customer cus_***** does not have a linked card with ID tok_*****
Date : March 29 2020, 07:55 AM
|
Where I add card detail to receive payment of subscribe user (customer) in Stripe
Date : March 29 2020, 07:55 AM
I hope this helps . Subscriptions use the default payment source. So when you Create a Customer, you just need to provide a source-argument.
|
Stripe Payment: Customer cus_***** does not have a linked card with ID card_*****
Date : March 29 2020, 07:55 AM
like below fixes the issue If you pass paymentSourceId with paymentSourceCustomerId, it is required to have that card linked with that customedId. You have two option to link a card with customer: curl https://api.stripe.com/v1/customers \
-u sk_test_BQokikJOvBiI2HlWgH4olfQ2: \
-d description="Customer for emily.harris@example.com" \
-d source=token
curl https://api.stripe.com/v1/customers/cus_D1p9ZtnrPS4XAR/sources \
-u sk_test_BQokikJOvBiI2HlWgH4olfQ2: \
-d source=token
|
Send payment in multiple destination account by using customer card id in stripe
Date : March 29 2020, 07:55 AM
|