1. Go to this page and download the library: Download apvanlaan/usaepay 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/ */
apvanlaan / usaepay example snippets
$customer = new EpayCustomer();
$customer->custkey = $custkey;
return $customer->getCustomer();
$customer = new EpayCustomer();
return $customer->listCustomers();
$customer = new EpayCustomer();
$params = ['first_name' =>"John",'last_name' =>"Doe",'street' =>"123 House Rd",'city' =>"Beverly Hills",'state' =>"CA",'postalcode' =>"90210",'country' =>"USA",'phone' =>"5558675309",'email' =>"[email protected]",'description' =>"Fake customer information for testing."];
return $customer->addCustomer($params);
$customerUpdate = new \StdClass();
$customerUpdate->custkey = "asdf";
$customerUpdate->description = 'Still a fake customer used for testing';
$customer = new EpayCustomer($params);
return $customer->updateCustomer();
$params = ['custkey'=>$request->custkey];
$customer = new EpayCustomer($params);
return $customer->deleteCustomer();