我从来没有使用过 OmniPay,顺便说一句,我在 GitHub 上搜索了我认为您正在寻找的 Omnipay类的 eMerchantPay 驱动程序。
$purchase = $gateway->purchase(array(
'currency' => 'GBP',
'transactionReference' => 'referenceID1',
'clientIp' => '95.87.212.88',
'items' => array(
array(
'name' => 10,
'price' => '5.00',
'description' => 'Product 1 Desc',
'quantity' => 2
),
array(
'name' => 12,
'price' => '5.00',
'description' => 'Shipping for Product 1',
'quantity' => 1
),
array(
'name' => 12,
'price' => '0.00',
'description' => 'Promotion',
'quantity' => 1
),
),
'card' => array(
'firstName' => 'Example',
'lastName' => 'User',
'number' => '4111111111111111',
'expiryMonth' => 7,
'expiryYear' => 2013,
'cvv' => 123,
'address1' => '123 Shipping St',
'address2' => 'Shipsville',
'city' => 'Shipstown',
'postcode' => '54321',
'state' => 'NY',
'country' => 'US',
'phone' => '(555) 987-6543',
'email' => 'john@example.com',
)
));
我建议您尝试在脚本中实现该 items 数组并测试结果。
PS:也许你错过了,但是有一个 composer 包将OmniPay 实现到 laravel Facade 中;)