尝试将购买发送到WorldPay会导致返回PurchaseResponse对象,而不尝试联系WorldPay服务器吗?
代码如下:
$gateway = Omnipay::create('WorldPay');
$gateway->setInstallationId('123456');
$gateway->setTestMode(true);
$data = array(
'amount' => '10.00',
'card' => array(
'cvv' => '123',
'expiryMonth' => '6',
'expiryYear' => '2016',
'number' => '4242424242424242'
),
'currency' => 'GBP',
'returnUrl' => 'http://returnurl.com'
);
$response = $gateway->purchase($data)->send();仔细查看该插件的代码,就会发现没有人试图访问WorldPay服务器。我遗漏了什么?
发布于 2014-01-08 04:56:03
根据此github问题,预计不会向worldpay发送任何数据:
https://github.com/omnipay/worldpay/issues/1
你不会错过任何东西的。Worldpay不需要任何服务器到服务器的通信,数据由客户端作为查询参数发送。
遵循omnipay约定,它返回一个重定向响应。你可以打电话给$response->isRedirect()和$response->redirect(),用正确的网址把你的客户转到Worldpay。
https://stackoverflow.com/questions/20956252
复制相似问题