It is simple wrapper class written in php to ease use of RaudhahPay Payment Gateway
composer require afiqiqmal/rpclient
Alternatively, you can specify as a dependency in your project's existing composer.json file
{
"require": {
"afiqiqmal/rpclient": "^1.2.0"
}
}
After installing, you need to require Composer's autoloader and add your code.
Setup config
$config = [
'api_key' => getenv('RAUDHAH_API_KEY'),
'signature_key' => getenv('RAUDHAH_X_SIGNATURE')
];
Or use Laravel config file name it as raudhahpay.php
and leave make()
blank
return [
'api_key' => env('RAUDHAH_API_KEY'),
'signature_key' => env('RAUDHAH_X_SIGNATURE', null),
'is_sandbox' => env('RAUDHAH_SANDBOX', env('APP_ENV') != 'production'),
];
RaudhahPay::make()
->collection()
->create("Collection Name");
RaudhahPay::make()
->collection()
->fetchList();
RaudhahPay::make()
->collection()
->updateCollectionName("CollectionID", "New Name");
RaudhahPay::make()
->collection()
->fetchByCode("CollectionCode");
RaudhahPay::make()
->bill()
->makeBill("COLLECTION CODE")
->setCustomer("Amirul", "Amirul", "hello@gmail.com", "60123456789", "Melaka")
->setReference("Testing")
->setProduct("Product 1", 10.30, 1)
->create();
RaudhahPay::make()
->product()
->create(string|array $title/$arrays, string $code, string $description, $price);
RaudhahPay::make()
->product()
->getList();
RaudhahPay::make()
->customer()
->create(string|array $firstName/$arrays, string $lastName = null, string $phoneNumber = null, string $email = null);
RaudhahPay::make()
->customer()
->getList();
$response = RaudhahPay::make()
->directPay()
->payee("COLLECTION CODE")
->getDirectPays();
$response = RaudhahPay::make()
->directPay()
->payee("COLLECTION CODE")
->getTransactions($direct_pay_payer_code);
RaudhahPay::make()->isCheckSumValid($payload); //boolean
- Other Raudhah Pay features. Still under development
- Unit Test
- Alter Readme
Licensed under the MIT license