1. Go to this page and download the library: Download geniv/nette-prtpe 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/ */
geniv / nette-prtpe example snippets
use Prtpe\Prtpe;
/** @var Prtpe @inject */
public $prtpe;
// init settings prtple payment gate
$prtpe->setTest(true|false) : void
// is test mode?
$prtpe->isTestMode() : bool
// set part custom descriptor
$prtpe->setDescriptor($text = 'vs: XXXYYY') : Prtpe
// manual enable create registration token
$prtpe->setStorePayment($state = true) : Prtpe
// add registration code for select storage payment
$prtpe->addRegistration($registrationId = '##id##') : Prtpe
// payment is success or not
$pay->isSuccess() : bool
// result prtpe status code (https://docs.prtpe.com/reference/resultCodes)
$pay->getResultCode(): string
// checkout id or payment id
$pay->getId() : strign
// registration id registred payment
$pay->getRegistrationId() : string
// array from payment gateway
$pay->getResult() : array
// value from array payment gateway
$pay->getResult('amount') : string
// send checkout
$checkout = $prtpe->checkout($price, 'VISA', $currency) : Response
// get inline script
$prtpe->getPaymentWidgetsScript($checkoutId) : string
// get url form
$prtpe->getPaymentWidgetsForm($shopperResultUrl = $this->link('success'), $brands = ['VISA', 'MASTER']) : string
// get status checkout
$status = $prtpe->getStatusCheckout($resourcePath) : Response
// new credit card
$card = new Card($number, $holder, $expiryMonth, $expiryYear, $cvv) : Card
// send payment
$pay = $prtpe->payment($card, $price, 'VISA', $currency) : Response
// get status payment
$pay = $prtpe->getStatusPayment($checkoutId = '##id##') : Response
// store card
$pay = $prtpe->storePaymentData($card) : Response