0

Hello everyone i need a working example to use stripe and skrill of Omnipay library.

The github code didn't not help me a lot. Thankyou

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(); }
greydnls
  • 342
  • 1
  • 9

1 Answers1

1

I think it should be $gateway = GatewayFactory::create('PayPal_Express');

Also what is the exact error that shows up.

Mihai P.
  • 9,307
  • 3
  • 38
  • 49