trillzglobal/virtual_card

Generating Virtual Visa Card for Customer Registered on Application

dev-main 2023-07-09 16:13 UTC

This package is auto-updated.

Last update: 2025-05-09 20:18:51 UTC


README

Language: PHP

Package is used to communicate with VISA for generating Cards. It includes -Virtual Card -Instant Card -Check Balance

composer require trillzglobal/virtual_card

Usage

use TrillzGlobal\VirtualCard\VirtualCard;

$create = new VirtualCard($base_url, $username,$password, $programId);

$base_url = https://sandbox.gtpportal.com/rest

Confirm if You can reach host with a ping

$requestId -> This is a unique identifier of each request

$create->testPing($requestId, $pingId)

To generate a new Card

$data -> Contains array of data

"accountSource"=>"Account Source must be provided", "address1"=> "First Address must be provided", "city"=> "Customer City is needed", "birthDate"=> "Date of Birth to be provided", "country"=> "Country Name needed", "emailAddress"=> "Valid Email Should be provided", _"firstName"=> "Firstname of Customer must be _provided", "idType"=> "Valid ID Type needed", "idValue"=> "Provide valid ID type", "lastName"=> "Customer Lastname Needed", _"countryCode"=> "Country code needed for mobile _Number", "number"=> "MObile Number needed", "preferredName"=> "Prefered Name cannot be empty", "referredBy"=> "ReferredBy must be provided", "stateRegion"=> "State Region must be provided", "subCompany"=> "Sub Company must be provided",

type = VIRTUAL/INSTANT

$create->generateCard($data, $requestId, $type)

Get transaction for Duration

$accountId => Id recieved when card was created $startDate => Date to start reporting 03-FEB $endDate => Date to stop reporting 03-APR $numberOfTrans => Number of record to pull

$create->getTransaction($data, $requestId)

Get Card Balance

$accountId => Id recieved when card was created

$create->getBalance($accountId, $requestId)

Transfer Between Cards

"currencyCode"=>"Use a valid country code", "fromAccountId"=> "From account cannot be empty", "last4Digit"=> "Last 4 digit of card to be provided", "paymentType"=> "Payment Type is needed", "toAccountId"=> "To Account needed", "transferAmount"=> "Transfer Amount Should be provided", "fromCardReferenceMemo"=> "To Card Reference Account needed", "toCardReferenceMemo"=> "From Card Reference Should be provided"

$create->transferBetweenCards($data, $requestId)

Transfer to Card

"currencyCode"=>"Use a valid country code", "last4Digit"=> "Last 4 digit of card to be provided", "paymentType"=> "Payment Type is needed", "transferAmount"=> "Transfer Amount Should be provided", "referenceMemo"=> "To Card Reference Account needed"

$create->transferToCard($data, $requestId)

Update Card Status

"newCardStatus"=>"Card Status must be Active/Inactive", "last4Digit"=> "Last 4 digit of card to be provided", "accountId"=> "Provide Customer Account ID", "mobileNumber"=> "Customer Mobile number must be provided"

$create->updateStatus($data, $requestId)

Get Balance

$create->getBalance($accountId, $requestId)

Get Card Details

For non PCI DSS Compiant Organization, This will only work routing through proxy. Therefore, proxy configuration must be implemented

$virtual_card->proxy_username = 'USs7SGaAw3UtSxL4RAstX'; $virtual_card->proxy_password='b61c24ba-ebd8-4cbf-e2ffb51cd65'; $virtual_card->proxy = 'http://'.$virtual_card->proxy_username.':'.$virtual_card->proxy_password.'@127.0.0.23:8080'; $virtual_card->set_proxy =1; $virtual_card->proxy_program_id = 'tok_sandbox_gsaBfTCohDgE4vYC9'; $virtual_card->proxy_authorization = 'tok_sandbox_tzfBba6tCVWEKWRj9Lt';

"last4Digit"=> "Last 4 digit of card to be provided",

$create->getCardDetails($data, $requestId)

array( [accountSource] => SKYE [address1] => First Address must be provided [birthDate] => 02-APR [city] => Abuja [country] => NG [emailAddress] => trillzglobal@gmail.com [firstName] => Michael [idType] => 3 [idValue] => AX3947573485 [lastName] => Ojo [countryCode] => 234 [number] => 9032878128 [preferredName] => Michael Ojo [referredBy] => 12700577 [stateRegion] => FC [subCompany] => 12700577 [expirationDate] => FEB-2024 [accountId] => 12703832 [startDate] => 05-FEB [endDate] => 20-APR [numberOfTransaction] => 30 [detail] => Funding My card [currencyCode] => NGN [last4Digits] => 3311 [transferType] => WALLETTOCARD [referenceMemo] => Michael Account Funding [transferAmount] => 2398 [mobileNumber] => 9032878128 [newCardStatus] => Active [newCardStatus] => Active [newCardStatus] => Active )