1. Go to this page and download the library: Download mbmjertan/keksphp 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/ */
$KeksSeller->provideSuccessRedirectFunction(function($KeksTransaction){
// your code here
return $successURL;
});
$KeksSeller->provideFailRedirectFunction(function($KeksTransaction){
// your code here
return $failURL;
});
$KeksSeller->provideValidateAdviceFunction(function($KeksAdvice){
// your code here, with a very very simple example as well
// if the JSON has a someField object, you can access it using $KeksAdvice->someField
if($KeksAdvice->amount != $YourShopOrder->amount) return false;
return true;
});
$KeksTransaction = new \KeksPHP\KeksTransaction($KeksSeller); // create a new KeksTransaction
$KeksTransaction->bill_id = 20;
$KeksTransaction->amount = 500;
var_dump($KeksTransaction->buildDeepLinkAndQR()); // use $KeksTransaction->buildDeepLinkAndQR()->deeplink to get the deeplink
$KeksTransaction = new \KeksPHP\KeksTransaction($KeksSeller);
$Response = $KeksTransaction->buildFromAdvice($YourAdvice);
echo json_encode($Response);
$KeksTransaction = new \KeksPHP\KeksTransaction($KeksSeller);
$Response = $KeksTransaction->buildFromAdvice();
echo json_encode($Response);
$KeksRefund = new \KeksPHP\KeksRefund($KeksSeller, $KeksTransaction);
$KeksRefund->createRefund($Amount);
$KeksRefund->submitRefund();
if($KeksRefund->RefundSuccessful){
echo 'yay, successfull refund!';
}
else{
echo 'oh no, I could not refund!';
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.