Skip to content

Billdesk Payment Gateway Integration for PHP Yii2.0 Framework

Notifications You must be signed in to change notification settings

jinujd/Yii2-Billdesk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Yii2-Billdesk

Billdesk Payment Gateway Integration for PHP Yii2.0 Framework

How to configure

  1. Put the BillDeskPayment.php file to /common/components.
  2. Add the component in main.php. Sample code in main.php is given below
<?php
return [
    'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
    'timeZone' => 'Asia/Kolkata',
    'components' => [ 

     'billDeskPayment' => [
        'class' => 'common\components\BillDeskPayment',
        'MERCHANT_ID' => '<YOUR MERCHANT ID>',
        'SECRET_KEY' => '<YOUR SECRET KEY>',
        'CHECKSUM_KEY' => '<YOUR CHECKSUM KEY>',
		'CURRENCY_TYPE' => '<YOUR CURRENCY TYPE>',
        'REDIRECT_ACTION' => <ACTION TO HANDLE PAYMENT SUCCESS/FAILURE>, // ex: ['site/after-payment']
     ],  
];
?>

In the above code , configure the redirect and cancel actions appropriately. In the redirect action action, you can extract the received parameters using

$params = Yii::$app->billDeskPayment->extractParams();

In $params order status and mechant parameters will be available.

About

Billdesk Payment Gateway Integration for PHP Yii2.0 Framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages