stripe test

This commit is contained in:
Tokumeikoi 2020-06-04 18:26:28 +08:00
parent b001f54b84
commit 036bb00c08

View File

@ -69,10 +69,10 @@ class OrderController extends Controller
case 'source.chargeable': case 'source.chargeable':
$source = $event->data->object; $source = $event->data->object;
\Stripe\Charge::create([ \Stripe\Charge::create([
'amount' => $source['amount'], 'amount' => $source->amount,
'currency' => $source['currency'], 'currency' => $source->currency,
'source' => $source['id'], 'source' => $source->id,
'metadata' => $source->metadata 'metadata' => (array)$source->metadata
]); ]);
die('success'); die('success');
break; break;