3
我有測試代碼,但我如何配置PayPal支付?如何使用Omnipay for Laravel 5?
這是測試代碼,但如果我想用貝寶來做呢?我應該怎麼做?
$cardInput = [
'number' => '4444333322221111',
'firstName' => 'MR. WALTER WHITE',
'expiryMonth' => '03',
'expiryYear' => '16',
'cvv' => '333',
];
$card = Omnipay::creditCard($cardInput);
$response = Omnipay::purchase([
'amount' => '100.00',
'returnUrl' => 'http://bobjones.com/payment/return',
'cancelUrl' => 'http://bobjones.com/payment/cancel',
'card' => $cardInput
])->send();
dd($response->getMessage());
這裏的文檔:https://github.com/ignited/laravel-omnipay
感謝的
如果我們需要爲postPayment()編寫單元測試會怎麼樣? –