0
我想將omnipay集成到一個網站。該firts時間我想創建一個卡,我碰到這個問題就來了:Omnipay:源參數是必需的
Omnipay: InvalidRequestException "The source parameter is required"
這裏是我的代碼:
$gateway = Omnipay::create('Stripe');
$gateway->setApiKey('sk_test_4IHf5iPTXVaZ8SF5GDcLTrqY');
$name_arr = explode(" ", $this->req['card-name']);
$card_data = [
'firstname' => $name_arr[0],
'surname' => $name_arr[1],
'expiryMonth' => $this->req['exp-month'],
'expiryYear' => $this->req['exp-year'],
'number' => $this->req['card-number'],
'email' => $client['email'],
'cvv' => $this->req['cvv']
];
$response = $gateway->createCard($card_data)->send();
我缺少什麼,或做錯了什麼? 謝謝!