astropay/cashoutcard

Astropay Cashout-cash integration package

Installs: 68

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 7

Forks: 2

pkg:composer/astropay/cashoutcard

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

This package is not auto-updated.

Last update: 2025-10-15 15:05:51 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());
}