PHP code example of everypay / everypay-php

1. Go to this page and download the library: Download everypay/everypay-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

everypay / everypay-php example snippets








use Everypay\Everypay;
use Everypay\Payment;

/**
 * Either your live secret API key or your sandbox secret API key.
 */
Everypay::setApiKey('sk_YoUraPikEy');

/** 
 * Set this true to test your sandbox account (also provide your sandbox secret API key above).
 * Ommit it or set it false to actually use your live account (also provide your live secret API key above 
 * - but be carefull, this is no longer a test!).
 */
Everypay::$isTest = true;

/**
 * You can only handle card information if you have PCI DSS SEQ D
 * This example is only for MOTO (mail order telephone order) payments
 * You need to use this plugin with our iFrame solution in order to handle card data
 */
$params = array(
    'card_number'       => '4111111111111111',
    'expiration_month'  => '01',
    'expiration_year'   => '2020',
    'cvv'               => '123',
	'holder_name'       => 'John Doe',
    'amount'            => 1000 # amount in cents for 10 EURO.
);

Payment::create($params);



Everypay::$isTest = true;