CashBaBa Payment Gateway driver for the Omnipay PHP payment processing library
Omnipay is a framework agnostic, multi-gateway payment processing library for PHP. This package implements CashBaBa support for Omnipay.
Omnipay is installed via Composer. To install, simply require league/omnipay
and omnipay/cashbaba
with Composer:
composer require league/omnipay omnipay/cashbaba
The following gateways are provided by this package:
For general usage instructions, please see the main Omnipay repository.
The Cashbaba integration is fairly straight forward. Essentially you just pass
a card token
field through to Cashbaba instead of the regular credit card data.
Add card System of this payment gateway need merchnat secret inside header and body portion send card data
$gateway = Omnipay::create('CashBaBa');
$gateway->setApiKey('c+h1cMVyy9');
$new_card = new CreditCard(array(
'firstName' => 'Example',
'lastName' => 'Customer',
'number' => '4321450000341686',
'expiryMonth' => '01',
'expiryYear' => '2020',
'cvv' => '456',
'email' => '[email protected]',
'billingAddress1' => '1 Lower Creek Road',
'billingCountry' => 'AU',
'billingCity' => 'Upper Swan',
'billingPostcode' => '6999',
'billingState' => 'WA',
));
try{
$result = $gateway->createCard(array(
'card' => $new_card,
// 'customerReference' => "4",
// 'cardReference' => "dfdf",
))->send();
if($result->isSuccessful()){
$card_id = $result->getCardReference();
$card_customer = $result->getCustomerReference();
echo "card_id:".$card_id;
echo "card_customer:".$card_customer;
}else{
echo $result->getMessage();
}
}catch (Exception $e){
echo $e->getMessage();
}
If you are having general issues with Omnipay, we suggest posting on Stack Overflow. Be sure to add the omnipay tag so it can be easily found.
If you want to keep up to date with release announcements, discuss ideas for the project, or ask more detailed questions, there is also a mailing list which you can subscribe to.