1. Go to this page and download the library: Download peteruu-maxpay/hpp-client 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/ */
peteruu-maxpay / hpp-client example snippets
$scriney = new \Maxpay\Scriney('publicKey', 'privateKey');
echo $scriney->buildButton('userId')->buildPopup();
$scriney = new \Maxpay\Scriney('publicKey', 'privateKey');
echo $scriney->buildButton('userId')->setProductId('productIdInMportal')->buildPopup();
$scriney = new \Maxpay\Scriney('publicKey', 'privateKey');
$result = $scriney->stopSubscription('hppR1463555724.2658mId548aId9', 'userId');
if ($scriney->validateApiResult($result)) {
//Api result is valid
}
$scriney = new \Maxpay\Scriney('publicKey', 'privateKey');
$result = $scriney->cancelPostTrial('hppR1463555724.2658mId548aId9');
if ($scriney->validateApiResult($result)) {
//Api result is valid
}
$scriney = new \Maxpay\Scriney('publicKey', 'privateKey');
$result = $scriney->refund('hppR1463555724.2658mId548aId9', 123.24, 'USD');
if ($scriney->validateApiResult($result)) {
//Api result is valid
}
//Api result example
/*
Array
(
[message] => Refund processed successfully, but all subscriptions already stopped.
[status] => Success
[transactionId] => hppAR1468587714.1807mId548aId9
[checkSum] => ee7ecd3b401735c40c5da4c3dcaf38952df5721d9626402cbbc1ccadd65b5616
)
*/
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.