Reputation: 1
I am getting error with the following code
$charge = \Stripe\Charge::create( array( 'card' => $myCard,
'amount' => $post['job_cost']*100,
'currency' => 'usd',
'description'=> "Charge from ".$_SESSION['email'] . " (".$_SESSION['organization'].") for job " . $post['job_title'],
'customer' => "cus_7XOlaXPFww6URY"
)
);
if I include "cutomer" then the error is
An uncaught Exception was encountered
Type: Stripe\Error\InvalidRequest
Message: Invalid string: {"number"=>"424242******4242", "exp_month"=>"1", "exp_year"=>"2016", "cvc"=>"***", "object"=>"card"}
Upvotes: 0
Views: 741
Reputation: 11202
You should use either the 'customer' or 'source' attributed but not both. From the current String create_charge PHP API documentation is seems 'card' is not a valid attribute.
Upvotes: 0