PHP code example of payeezy / payeezy-php
1. Go to this page and download the library: Download payeezy/payeezy-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/ */
payeezy / payeezy-php example snippets
$client = new Payeezy_Client();
$client->setApiKey("YOUR_API_KEY");
$client->setApiSecret("YOUR_API_SECRET");
$client->setMerchantToken("YOUR_MERCHANT_TOKEN");
$client->setUrl("https://api-cert.payeezy.com/v1/transactions");
$card_transaction = new Payeezy_CreditCard($client);
$response = $card_transaction->purchase([
"merchant_ref" => "Astonishing-Sale",
"amount" => "1299",
"currency_code" => "USD",
"credit_card" => array(
"type" => "visa",
"cardholder_name" => "John Smith",
"card_number" => "4788250000028291",
"exp_date" => "1020",
"cvv" => "123"
)
]);
echo "<pre>";
var_dump($response);
echo "</pre>";