PHP code example of sch-group / postaffiliate-pro
1. Go to this page and download the library: Download sch-group/postaffiliate-pro 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/ */
sch-group / postaffiliate-pro example snippets
$saleFinder = new PostAffiliateSaleFinder($postAffiliateConfig);
$orderNumber = 'test_order_number';
$sales = $saleFinder->findSalesBy($orderNumber);
$sale = $saleFinder->findFirstSaleBy($orderNumber);
$statusChanger = new PostAffiliateSaleStatusChanger($postAffiliateConfig);
$orderNumber = 'test_order_number';
$sale = $saleFinder->findFirstSaleBy($orderNumber);
$statusChanger->changeSaleStatus($sale->getTransactionId(), SaleData::APPROVED_STATUS);