需要帮助实施omnipay

时间:2014-10-28 10:18:00

标签: omnipay

大家好我需要一个工作示例来使用Omnipay库的条纹和skrill。

github代码并没有帮助我很多。谢谢你

use Omnipay\Omnipay;

$gateway = Omnipay::create('Stripe'); $gateway->setApiKey('abc123');

$formData = ['number' => '4242424242424242', 'expiryMonth' => '6',
'expiryYear' => '2016', 'cvv' => '123']; $response =
$gateway->purchase(['amount' => '10.00', 'currency' => 'USD', 'card'
=> $formData])->send();

if ($response->isSuccessful()) {
    // payment was successful: update database
    print_r($response); } elseif ($response->isRedirect()) {
    // redirect to offsite payment gateway
    $response->redirect(); } else {
    // payment failed: display message to customer
    echo $response->getMessage(); }

1 个答案:

答案 0 :(得分:1)

我认为它应该是$gateway = GatewayFactory::create('PayPal_Express');

同样出现的确切错误是什么。