1. Go to this page and download the library: Download markette/gopay 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/ */
markette / gopay example snippets
use Markette\Gopay\Service\PaymentService;
use Markette\Gopay\Service\RecurrentPaymentService;
use Markette\Gopay\Service\PreAuthorizedPaymentService;
/** @var PaymentService @inject */
public $paymentService;
/** @var RecurrentPaymentService @inject */
public $recurrentPaymentService;
/** @var PreAuthorizedPaymentService @inject */
public $preAuthorizedPaymentService;
$binder->bindPaymentButtons($service, $form, [$this, 'submitForm']);
// or more callbacks
$gopay->bindPaymentButtons($form, [
[$this, 'preProcessForm'],
[$this, 'processForm'],
[$this, 'postProcessForm'],
]);
use Markette\Gopay\Form;
public function submittedForm(Form\PaymentButton $button)
{
$channel = $button->getChannel();
}