Fatal error: Uncaught Error: Class 'Omnipay\Omnipay' not found -


i'm messing around omnipay , received message:

fatal error: uncaught error: class 'omnipay\omnipay' not found

the directory listing:

  • composer.json
  • composer.lock
  • test.php
  • vendor

test.php

<?php use omnipay\omnipay;  $gateway = omnipay::create('stripe'); $gateway->setapikey('abc123');  $formdata = array('number' => '4242424242424242', 'expirymonth' => '6', 'expiryyear' => '2016', 'cvv' => '123'); $response = $gateway->purchase(array('amount' => '10.00', 'currency' => 'usd', 'card' => $formdata))->send();  if ($response->isredirect()) {  // redirect offsite payment gateway  $response->redirect(); } elseif ($response->issuccessful()) {  // payment successful: update database  print_r($response); } else {  // payment failed: display message customer  echo $response->getmessage(); } ?> 

i don't code php in fashion , website directions vague @ point. looks excellent way save time but...i don't code way. missing?


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -