astropay/cashoutcard

Astropay Cashout-cash integration package

dev-master 2016-08-26 21:04 UTC

This package is not auto-updated.

Last update: 2022-09-21 00:03:38 UTC


README

Read full documentation at https://developers.astropaycard.com/

Example

composer require astropay/cashoutcard dev-master

copy code reference in public/index.php

<?php

include 'vendor/autoload.php';

$login = 'merchant_x_login';
$trans_key = 'merchant_x_trans_key';
$secret = 'merchant_secret';

$api = new \Astropay\CashoutCard(Astropay\Constants::ENV_SANDBOX);
$api->setCredentials($login, $trans_key, $secret);
$api->setAmount(100);
$api->setCurrency('USD');
$api->setEmail('test@astropaycard.com');
$api->setName('Test recipient');
$api->setDocument('8976fsdf1234');

if($api->sendCard()){
    echo urldecode($api->getMessage());    
    echo '<br/>'.$api->getAuthCode();
} else {
    echo urldecode($api->getMessage());
}