0

大家好,我需要一个工作示例来使用 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(); }
4

1 回答 1

1

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

还有什么是显示的确切错误。

于 2014-11-04T06:56:40.187 回答