cakephp - omnipay pin payments with cake php 2.0 -


i need regarding omnipay pin payments. have no clue how integrate cake php.

i tried sample code dint success

$gateway = gatewayfactory::create('pin'); $gateway->setsecretkey('your-secret-api-key'); $gateway->purchase([   'email'       => 'customer@email.com',   'description' => 'widgets',   'amount'      => '4999',   'currency'    => 'usd',   'card_token'  => 'card_nytgw7korg23eep9ntmz9w',   'ip_address'  => '1.2.3.4' ])->send();  

fatal error: class 'gatewayfactory'

please me . in advance

you need use composer install omnipay. explained in omnipay readme.

make file called composer.json in root of project directory:

{     "require": {         "omnipay/pin": "~2.0"     } } 

then run following commands in terminal window:

$ curl -s http://getcomposer.org/installer | php $ php composer.phar update 

this download omnipay files vendor/ directory.

next, need put following line @ top of index.php file, register composer autoloader:

require 'vendor/autoload.php'; 

finally, can use omnipay in project create pin gateway:

$gateway = omnipay\omnipay::create('stripe'); 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -