PHP code example of pencepay / pencepay-php
1. Go to this page and download the library: Download pencepay/pencepay-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/ */
pencepay / pencepay-php example snippets
Pencepay_Context::setPublicKey("your-public-key");
Pencepay_Context::setSecretKey("your-secret-key");
$transaction = Pencepay_Transaction::create(
Pencepay_Request_Transaction::build()
->orderId('123456')
->amount('10.99')
->currencyCode('EUR')
->creditCard()
->cardholderName('John Hancock')
->number('4350100010001002')
->cvv('313')
->expiryMonth(12)
->expiryYear(2016)
->done()
);
print_r($transaction);