buildrr / tango-raas-api
TangoCard RAAS PHP SDK
Requires
- php: >=8.0
- ext-curl: *
- ext-json: *
Requires (Dev)
- phpunit/phpunit: 4.3.*
This package is auto-updated.
Last update: 2024-12-09 19:03:10 UTC
README
Tango Rewards as a Service v2 API for PHP
TangoCard RAAS PHP SDK for RAAS api v2
Refer to Tango Raas API for actual response and requests. https://integration-www.tangocard.com/raas_api_console/v2/
Usage
Initialize the base Tango Object with your API credentials.
$tangocard = new TangoCard('PLATFORM_ID','PLATFORM_KEY');
$tangocard->setAppMode("sandbox"); //Default mode is production.
Valid Values : "production", "sandbox"
Raas API Calls:
All Raas api calls return a stdObject with two properties: status and data The data property contains the response from the RaaS API as an stdObject.
Response Structure:
Buildrr\TangoRaasApi\TangoCardResponse Object
(
[status] => //contains status of the request : True if api response is 2x else false
[data] => stdClass Object
(
//contains requested data
)
)
-
Get a list of all Customers
$tangoCard->getCustomers();
-
Create a new Customer
$tangoCard->createCustomer($customerIdentifier,$displayName);
-
Get details for a specific Customer
$tangoCard->getCustomerInfo($customerIdentifier);
-
Get a list of all Accounts created for a specific Customer
$tangoCard->getCustomerAccounts($customerIdentifier);
-
Create an Account under a specific Customer
$tangoCard->createCustomerAccount($customerIdentifier,$contactEmail,$displayName,$accountIdentifier);
-
Get a list of Accounts
$tangoCard->getAccountList();
-
Get details for a specific Account
$tangoCard->getAccountDetail($accountIdentifier);
-
Fund an Account
$tangoCard->fundAccount($customerIdentifier,$accountIdentifier,$creditCardToken,$amount);
-
Unregister a Credit Card
$tangoCard->unregisterCreditCard($customerIdentifier,$accountIdentifier,$creditCardToken);
-
List all credit cards
$tangoCard->getCreditCardList();
-
Register a new Credit Card
$tangoCard->registerCreditCard($customerIdentifier,$accountIdentifier,$cardNumber,$verificationNumber,$expiration,$firstName,$lastName,$emailAddress,$addressLine1,$addressLine2,$city,$state,$postalCode,$country,$ipAddress,$label);
-
Get details for a specific Credit Card
$tangoCard->getCreditCardDetail($creditCardToken);
-
Get all items in the Platform's Catalog
$tangoCard->getCatalogs();
-
Get a list of Orders
$tangoCard->getOrderList();
-
Create an Order under a specific Account
$tangoCard->placeOrder($customerIdentifier,$accountIdentifier,$amount,$utid,$sendEmail,$recipientEmail,$recipientFirstName,$recipientLastName,$campaign,$emailSubject,$message,$notes,$senderEmail,$senderFirstName,$senderLastName,$externalRefID);
-
Get details for a specific Order
$tangoCard->getOrderDetail($refOrderId);
-
Resend a specific Order
$tangoCard->resendOrder($referenceOrderID);