1. Go to this page and download the library: Download atpay/atpay_php 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/ */
atpay / atpay_php example snippets
$session = new \AtPay\Session(partner_id, public_key, private_key);
$invoice_token = new \AtPay\Token\Targeted($session, 20, '[email protected]');
echo $invoice_token->to_s();
$bulk_token = new \AtPay\Token\Bulk($session, 30);
echo $bulk_token->to_s();
$invoice_token = new \AtPay\Token\Targeted($session, 20, '[email protected]');
$invoice_token->auth_only();
echo $invoice_token->to_s();
$invoice_token = new \AtPay\Token\Targeted($session, 20, '[email protected]');
$invoice_token->expires_in_seconds(60 * 60 * 24 * 7); // one week
echo $invoice_token->to_s();
$invoice_token = new \AtPay\Token\Targeted($session, 20, '[email protected]');
$invoice_token->url('https://example.com/invoices/123');
echo $invoice_token->to_s();
$invoice_token = new \AtPay\Token\Targeted($session, 20, '[email protected]');
$invoice_token->request_custom_data('gift_message', true); //Input name ,
$invoice_token = new \AtPay\Token\Targeted($session, 20, '[email protected]');
$invoice_token->set_item_details("Lorem Ipsum ...");
echo $invoice_token->to_s();
$invoice_token = new \AtPay\Token\Targeted($session, 20, '[email protected]');
$invoice_token->set_item_quantity(3);
echo $invoice_token->to_s();
$invoice_token = new \AtPay\Token\Targeted($session, 20, '[email protected]');
$token_token->estimated_fulfillment_days(3) # The token is now auth-only!
email(token.to_s, receipient_address)