Skip to content

Upay(bangladesh) payment gateway integration package for laravel/php projects

License

Notifications You must be signed in to change notification settings

codeboxrcodehub/upay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6a71bf3 · Sep 1, 2022

History

11 Commits
Sep 1, 2022
Sep 1, 2022
Aug 11, 2022
Sep 1, 2022
Sep 1, 2022

Repository files navigation

uPay BD Payment Gateway

Features

  1. Create Payment/Take to Payment Page
  2. Query Payment/Payment Details

Requirements

  • PHP >=7.4
  • Laravel >= 6

Installation

composer require codeboxr/upay

vendor publish (config)

php artisan vendor:publish --provider="Codeboxr\Upay\UpayServiceProvider"

After publish config file setup your credential. you can see this in your config directory upay.php file

"sandbox"                => env("UPAY_SANDBOX", false), // for sandbox use true
"server_ip"              => env("UPAY_SERVER_IP", ""),
"merchant_id"            => env("UPAY_MERCHANT_ID", ""),
"merchant_key"           => env("UPAY_MERCHANT_KEY", ""),
"merchant_code"          => env("UPAY_MERCHANT_CODE", ""),
"merchant_name"          => env("UPAY_MERCHANT_NAME", ""),
"merchant_mobile"        => env("UPAY_MERCHANT_MOBILE", ""),
"merchant_city"          => env("UPAY_MERCHANT_CITY", ""),
"merchant_category_code" => env("UPAY_CATEGORY_CODE", ""),
"redirect_url"           => env("UPAY_CALLBACK_URL", "")

Set .env configuration

UPAY_SANDBOX=true // for production use false
UPAY_SERVER_IP="" // uPay only support IPV4
UPAY_MERCHANT_ID=""
UPAY_MERCHANT_KEY=""
UPAY_MERCHANT_CODE=""
UPAY_MERCHANT_NAME=""
UPAY_MERCHANT_MOBILE=""
UPAY_MERCHANT_CITY=""
UPAY_CATEGORY_CODE=""
UPAY_CALLBACK_URL=""

Usage

1. Create Payment

use Codeboxr\Upay\Facade\Payment;

return Payment::executePayment($amount, $invoiceId, $txnId, $date);

Example

return Payment::executePayment(10, 'CBX10101', '10127373', '2022-08-26');

2. Query Payment

use Codeboxr\Upay\Facade\Payment;

Payment::queryPayment($invoiceId); // Invoice ID 

Note: uPay only support IPV4

Contributing

Contributions to the uPay package are welcome. Please note the following guidelines before submitting your pull request.

  • Follow PSR-4 coding standards.
  • Read uPay API documentations first

License

uPay package is licensed under the MIT License.

Copyright 2022 Codeboxr