PHP code example of gonmt / omnipay-payzen-lat
1. Go to this page and download the library: Download gonmt/omnipay-payzen-lat 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/ */
gonmt / omnipay-payzen-lat example snippets
$paymentParams = array(
...
'createCard' => true,
'ownerReference' => 'an owner reference',
));
$purchaseRequest = $gateway->purchase($paymentParams);
$redirectResponse = $purchaseRequest->send();
$paymentParams = array(
...
'ownerReference' => 'an owner reference',
));
$createCardRequest = $gateway->createCard($paymentParams);
$redirectResponse = $createCardRequest->send();
$paymentParams = array(
...
));
$completePurchaseRequest = $gateway->completePurchase($paymentParams);
$callbackResponse = $completePurchaseRequest->send();
if ($callbackResponse->hasCreatedCard()) {
$cardReference = $callbackResponse->getCardReference();
$ownerReference = $callbackResponse->getOwnerReference();
}
$paymentParams = array(
...
'cardReference' => 'XXXXXXXXXX',
));
$purchaseRequest = $gateway->purchase($paymentParams);
$redirectResponse = $purchaseRequest->send();