我试图将 Omnipay API 与 Stripe 一起使用,但我无法传入额外的参数,例如“名称”、“元数据”或“邮编”。
// The token is grabbed from stripe JS
$this->stripe_gateway = Omnipay::create('Stripe');
$response = $this->stripe_gateway->purchase([
'amount' => $amount,
'currency' => 'usd',
'name' => $name,
'description' => $product->title,
'zip_address' => $zip,
'metadata' => [
'name' => $name,
'user_id' => $this->session->get('id')
],
'token' => $stripeToken,
])->send();
我什么都做不了,这不是内置在 API 中的吗?