I'm using stripe SDK for creating customers & charge to a customer using API, but getting an error with "Fatal error: Uncaught (Status 400) (Request req_ZyqUtykjUcOqrU) As per Indian regulations, export transactions require a customer name and address. More info here: https://stripe.com/docs/india-exports thrown in /opt/lampp/htdocs/stripe/lib/Exception/ApiErrorException.php on line 38"
My code is like below:
\Stripe\Stripe::setApiKey(STRIPE_API_KEY);
$customer = \Stripe\Customer::create(array(
'name' => 'test',
'description' => 'test description',
'email' => $email,
'source' => $token
));
$orderID = strtoupper(str_replace('.','',uniqid('', true)));
$charge = \Stripe\Charge::create(array(
'customer' => $customer->id,
//'source' => 'rtest',
'amount' => $itemPrice,
'currency' => $currency,
'description' => $itemName,
'metadata' => array(
'order_id' => $orderID
)
));