buildrr/tango-raas-api

TangoCard RAAS PHP SDK

v1.0 2022-11-09 13:58 UTC

This package is auto-updated.

Last update: 2024-09-09 18:28:43 UTC


README

PHP版本的Tango Rewards as a Service v2 API

TangoCard RAAS PHP SDK,用于RAAS api v2

有关实际的响应和请求,请参考Tango Raas API。https://integration-www.tangocard.com/raas_api_console/v2/

用法

使用您的API凭据初始化基础Tango对象。

$tangocard = new TangoCard('PLATFORM_ID','PLATFORM_KEY');

$tangocard->setAppMode("sandbox"); //Default mode is production.

有效值:"production","sandbox"

Raas API调用

所有Raas API调用都返回一个包含两个属性(status和data)的stdObject。data属性包含RaaS API的响应,作为一个stdObject。

响应结构

Buildrr\TangoRaasApi\TangoCardResponse Object
(
    [status] => //contains status of the request : True if api response is 2x else false
    [data] => stdClass Object
        (
        	//contains requested data
        )
)
  1. 获取所有客户列表

     $tangoCard->getCustomers();
    
  2. 创建新的客户

     $tangoCard->createCustomer($customerIdentifier,$displayName);
    
  3. 获取特定客户的详细信息

     $tangoCard->getCustomerInfo($customerIdentifier);
    
  4. 获取特定客户创建的所有账户列表

     $tangoCard->getCustomerAccounts($customerIdentifier);
    
  5. 在特定客户下创建账户

     $tangoCard->createCustomerAccount($customerIdentifier,$contactEmail,$displayName,$accountIdentifier);
    
  6. 获取账户列表

     $tangoCard->getAccountList();
    
  7. 获取特定账户的详细信息

     $tangoCard->getAccountDetail($accountIdentifier);
    
  8. 为账户充值

     $tangoCard->fundAccount($customerIdentifier,$accountIdentifier,$creditCardToken,$amount);
    
  9. 注销信用卡

     $tangoCard->unregisterCreditCard($customerIdentifier,$accountIdentifier,$creditCardToken);
    
  10. 列出所有信用卡

    $tangoCard->getCreditCardList();
    
  11. 注册新的信用卡

    $tangoCard->registerCreditCard($customerIdentifier,$accountIdentifier,$cardNumber,$verificationNumber,$expiration,$firstName,$lastName,$emailAddress,$addressLine1,$addressLine2,$city,$state,$postalCode,$country,$ipAddress,$label);
    
  12. 获取特定信用卡的详细信息

    $tangoCard->getCreditCardDetail($creditCardToken);
    
  13. 获取平台目录中的所有项目

    $tangoCard->getCatalogs();
    
  14. 获取订单列表

    $tangoCard->getOrderList();
    
  15. 在特定账户下创建订单

    $tangoCard->placeOrder($customerIdentifier,$accountIdentifier,$amount,$utid,$sendEmail,$recipientEmail,$recipientFirstName,$recipientLastName,$campaign,$emailSubject,$message,$notes,$senderEmail,$senderFirstName,$senderLastName,$externalRefID);
    
  16. 获取特定订单的详细信息

    $tangoCard->getOrderDetail($refOrderId);
    
  17. 重新发送特定订单

    $tangoCard->resendOrder($referenceOrderID);