1. Go to this page and download the library: Download parthenon/transaction-cloud 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/ */
parthenon / transaction-cloud example snippets
$transactionCloud = new \TransactionCloud\TransactionCloud::create("api_key", "api_key_password");
// and if you want to use the sandbox
$transactionCloud = new \TransactionCloud\TransactionCloud::create("api_key", "api_key_password", true);
$transactionCloud = new \TransactionCloud\TransactionCloud::create("api_key", "api_key_password");
$url = $transactionCloud->getUrlToManageTransactions("[email protected]");
$transactionCloud = new \TransactionCloud\TransactionCloud::create("api_key", "api_key_password");
$url = $transactionCloud->getUrlToAdmin();
$transactionCloud = new \TransactionCloud\TransactionCloud::create("api_key", "api_key_password");
$transactions = $transactionCloud->getTransactionsByEmail("[email protected]");
/** @var $transaction \TransactionCloud\Model\Transaction **/
foreach ($transactions as $transaction) {
// Do something with transaction
}
$transactionCloud = new \TransactionCloud\TransactionCloud::create("api_key", "api_key_password");
$transaction = $transactionCloud->getTransactionById("TC-TR_xxyyxxx");
// do something with transaction.
$transactionCloud = new \TransactionCloud\TransactionCloud::create("api_key", "api_key_password");
$success = $transactionCloud->assignTransactionToEmail("TC-TR_xxyyxxx", "[email protected]");
$transactionCloud = new \TransactionCloud\TransactionCloud::create("api_key", "api_key_password");
$success = $transactionCloud->cancelSubscription("TC-TR_xxyyxxx");
$transactionCloud = new \TransactionCloud\TransactionCloud::create("api_key", "api_key_password");
$refundData = $transactionCloud->refundTransaction("TC-TR_xxyyxxx");
$transactionCloud = new \TransactionCloud\TransactionCloud::create("api_key", "api_key_password");
$transactions = $transactionCloud->fetchChangedTransactions();
/** @var $transaction \TransactionCloud\Model\ChangedTransaction **/
foreach ($transactions as $transaction) {
// Do something with transaction
}
$transactionCloud = new \TransactionCloud\TransactionCloud::create("api_key", "api_key_password");
$success = $transactionCloud->markTransactionAsProcessed("TC-TR_xxyyxxx");