All Projects → arif98741 → nagadApi

arif98741 / nagadApi

Licence: other
This is Bangladeshi nagad payment gateway api development library. This library can be used in any php application.

Programming Languages

PHP
23972 projects - #3 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to nagadApi

react-native-payumoney
React Native Payumoney (Android/IOS)
Stars: ✭ 18 (-10%)
Mutual labels:  payment, payment-gateway, payment-integration
omnipay-2checkout
2Checkout driver for the Omnipay PHP payment processing library
Stars: ✭ 25 (+25%)
Mutual labels:  payment, payment-gateway, payment-integration
adyen-dotnet-api-library
Adyen API Library for .NET
Stars: ✭ 69 (+245%)
Mutual labels:  payment, payment-gateway, payment-integration
adyen-node-api-library
Adyen API Library for Node.js
Stars: ✭ 82 (+310%)
Mutual labels:  payment, payment-gateway, payment-integration
Paynow-NodeJS-SDK
NodeJS SDK for Zimbabwe's leading payments gateway, Paynow
Stars: ✭ 23 (+15%)
Mutual labels:  payment, payment-gateway, payment-integration
cybersource-sdk-java
Java SDK for CyberSource Simple Order API
Stars: ✭ 44 (+120%)
Mutual labels:  payment, payment-gateway, payment-integration
python-daraja
Python Wrapper for interacting with the MPESA Daraja API. More Features to be implemented
Stars: ✭ 20 (+0%)
Mutual labels:  payment, payment-gateway, payment-integration
wc-moldovaagroindbank
WooCommerce maib Moldova Agroindbank Payment Gateway
Stars: ✭ 13 (-35%)
Mutual labels:  payment, payment-gateway, payment-integration
adyen-python-api-library
Adyen API Library for Python
Stars: ✭ 41 (+105%)
Mutual labels:  payment, payment-gateway, payment-integration
cybersource-android-sdk
The CyberSource InApp SDK enables developers to simply and securely incorporate mobile payments into their Android applications.
Stars: ✭ 25 (+25%)
Mutual labels:  payment, payment-gateway, payment-integration
paymentgateway
Dokumentace ČSOB platební brány a jejího eAPI pro platby platebními kartami, Apple Pay, mallpay a platebními tlačítky ČSOB.
Stars: ✭ 104 (+420%)
Mutual labels:  payment, payment-gateway, payment-integration
ccashcow
💰 Accept cards & crypto. Payments so easy a cow could do it.
Stars: ✭ 40 (+100%)
Mutual labels:  payment, payment-gateway, payment-integration
awesome-payment
A curated list of payment services
Stars: ✭ 22 (+10%)
Mutual labels:  payment, payment-gateway, payment-integration
adyen-hybris
Adyen Payment plugin for Hybris
Stars: ✭ 23 (+15%)
Mutual labels:  payment, payment-gateway, payment-integration
adyen-salesforce-commerce-cloud
Salesforce Commerce Cloud (formerly Demandware)
Stars: ✭ 63 (+215%)
Mutual labels:  payment, payment-gateway, payment-integration
midtrans-nodejs-client
Official Midtrans Payment API Client for Node JS | https://midtrans.com
Stars: ✭ 124 (+520%)
Mutual labels:  payment, payment-gateway
toss
Toss 결제를 위한 python client library
Stars: ✭ 51 (+155%)
Mutual labels:  payment, payment-gateway
laravel-pix
Uma solucão simples para integrar sua aplicação Laravel a API PIX do Banco Central do Brasil
Stars: ✭ 73 (+265%)
Mutual labels:  payment, payment-gateway
42-cent
Node.js multi-gateway payment processing module
Stars: ✭ 43 (+115%)
Mutual labels:  payment, payment-gateway
PayPalPlugin
Official integration with PayPal Commerce Platform
Stars: ✭ 21 (+5%)
Mutual labels:  payment, payment-gateway

NagadApi

Installation Process

composer require xenon/nagad-api

Example Code

<?php

use Xenon\NagadApi\Helper;
use Xenon\NagadApi\Base;

require 'vendor/autoload.php';

//all configuration are used here for demo purpose.
//for use in dev mode use 'development'
//for use in production mode use 'production'
$config = [
    'NAGAD_APP_ENV' => 'development', //development|production
    'NAGAD_APP_LOG' => '1',
    'NAGAD_APP_ACCOUNT' => '016XXXXXXXX', //demo
    'NAGAD_APP_MERCHANTID' => '6800000025', //demo
    'NAGAD_APP_MERCHANT_PRIVATE_KEY' => 'MIIEvFAASCBKYwgRF45v1GfXiqEB5c5REJ8Toy83gzGE3ApmLipoegnwMkewsTNDbe5xZdxN1qfKiRiCL720FtQfIwPDp9ZqbG2OQbdyZUB8I08irKJ0x/psM4SjXasglHBK5G1DX7BmwcB/PRbC0cHYy3pXDmLI8pZl1NehLzbav0Y4fP4MdnpQnfzZJdpaGVE0oI15lq+KZ0tbllNcS+/4M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ZFmrHvV9IMIGjP7XIlVa1uiMCt41FVyINB9SJnamGGauW/pyENvEVh+ueuthSg37e/l0Xu0nm/XGqyKCqkAfBbL2Uj/j5FyDFrpF27PkANDo99CdqL5A4NQzZ69QRlCQ4wnNCq6GsYy2WEJyU2D+K8EBSQcwLsrI7QL7fvQ==',
    'NAGAD_APP_MERCHANT_PG_PUBLIC_KEY' => 'MIIBIjANBc54jjMJoP2toR9fGmQV7y9fz31UVxSk97AqWZZLJBT2lmv76AgpVV0k0xtb/0VIv8pd/j6TIz9SFfsTQOugHkhyRzzhvZisiKzOAAWNX8RMpG+iqQi4p9W9VrmmiCfFDmLFnMrwhncnMsvlXB8QSJCq2irrx3HG0SJJCbS5+atz+E1iqO8QaPJ05snxv82Mf4NlZ4gZK0Pq/VvJ20lSkR+0nk+s/v3BgIyle78wjZP1vWLU4wIDAQAB',
    'NAGAD_APP_TIMEZONE' => 'Asia/Dhaka',
];

$nagad = new Base($config, [
    'amount' => 100,
    'invoice' => Helper::generateFakeInvoice(15, true),
    'merchantCallback' => 'https://example.com/payment/success/id=4',
]);
$status = $nagad->payNow($nagad); //will redirect to payment url of Nagad

//after that use below method for extracting payment response that will return an array
$response = Helper::successResponse('https://example.com/payment/success/id=4/?merchant=683XXXX225&order_id=CKH060JXXXXXFRA2&payment_ref_id=MXXXXXXXXtIMDYwSjFRSlBRMUZSQTIuMTg0NTE2Yzc3ZmEzNmEwZTJlZjk=&status=Success&status_code=00_0000_000&message=Successful%20Transaction&payment_dt=20211123235008&issuer_payment_ref=MTEyMzIzNDg1NzUwOS42ODMwMDIwMDcxMDQyMjUuQ0tIMDYwSjFRSlBRMUZSQTIuMTg0NTE2Yzc3ZmEzNmEwZTJlZjk=');
Array
(
    [merchant] => 683XXXX225
    [order_id] => CKH060JXXXXXFRA2
    [payment_ref_id] => MXXXXXXXXtIMDYwSjFRSlBRMUZSQTIuMTg0NTE2Yzc3ZmEzNmEwZTJlZjk=
    [status] => Success
    [status_code] => 00_0000_000
    [message] => Successful Transaction
    [payment_dt] => 20211123235008
    [issuer_payment_ref] => MTEyMzIzNDg1NzUwOXXXXXtIMDYwSjFRSlBRMUZSQTIuMTg0NTE2Yzc3ZmEzNmEwZTJlZjk=
)


//For payment verification use below method. You will then get below json as response. 
echo $config->verifyPayment($response['payment_ref_id']);
## Payment verification Response
{
	merchantId: "683XXXX225",
	orderId: "CKH060JXXXXXFRA2",
	paymentRefId: "MXXXXXXXXtIMDYwSjFRSlBRMUZSQTIuMTg0NTE2Yzc3ZmEzNmEwZTJlZjk=",
	amount: "16",
	clientMobileNo: "016****5428",
	merchantMobileNo: "01XXXXXXX10",
	orderDateTime: "2021-11-23 23:48:22.0",
	issuerPaymentDateTime: "2021-11-23 23:50:08.0",
	issuerPaymentRefNo: "000XXXW",
	additionalMerchantInfo: null,
	status: "Success",
	statusCode: "000",
	cancelIssuerDateTime: null,
	cancelIssuerRefNo: null
}

Maintainer

Contributors

Information:

Sandbox

  1. Need sandbox details for sandbox testing. Check your email that you have got from nagad authority
  2. Use sandbox details such as pgpublickey, privatekey, merchant-id for sandbox testing
  3. You need to register a mobile number for sandbox testing. Contact with your account manager for doing this
  4. You should test environment before going to live

Live

  1. Need production details for production final. You will get through email
  2. Your server ip/domain should be whitelisted before running in production

Login to your nagad merchant panel

https://auth.mynagad.com:10900/authentication-service-provider-1.0/login

Step 1: In the Merchant Portal, Go to Merchant Integration Details under Merchant Management Menu. You will get the Merchant ID which is your Merchant ID for Integration.

Then, Click on “Key Generate” and Download the Merchant Private Key and Merchant Public Key.

Step 2: Go to Merchant Integration under Merchant Management Menu. Put your Call Back URL and Upload the Merchant Public Key which you have downloaded in Step 1. Add and Submit!

  1. If you have any question/query then email me [email protected]
  2. Do Code, Be Crazy

### If you find any kind of issues or bug you are highly encouraged to report. For reporting use issues. For can also push pull request. For pull request you should use dev branch. Because our master branch is serving at this moment for usage.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].