承接 neputertech/khalti 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

neputertech/khalti

Composer 安装命令:

composer require neputertech/khalti

包简介

Php wrapper for khalti integration

README 文档

README

This package can help you integrate Khalti new ePayment Gateway (NEW) to your php application.

Khalti ePay Docs

Here is an example of how you can initiate Khalti transaction:

...
use Neputer\Facades\Khalti;
use Illuminate\Support\Facades\Redirect;

class PaymentController extends Controller {
    ...
    public function pay() {
        $return_url = "http://example.com/verify";
        $purchase_order_id = "your_transaction_id"; // example 123567;
        $purchase_order_name = "your_order_name"; // example Transaction: 1234,
        $amount = 1000; // Your total amount in paisa Rs 1 = 100 paisa

        $response =  Khalti::initiate($return_url, $purchase_order_id, $purchase_order_name,  $amount);

        // Custom handle of khalti response

        return Redirect::to($response->payment_url);
    }

    public function verify(Request $request) {
        $pidx = $request->get('pidx');
        return Khalti::lookup($pidx);
    }


}

Installation

You can install the package via composer:

composer require neputertech/khalti

The package will automatically register itself.

You can publish the config with:

php artisan vendor:publish --tag=khalti-config

This is the contents of the published config file:

<?php

return [
    'debug' => env('KHALTI_DEBUG', true), // set false to run on live khalti url
    'website_url' => 'https://example.com', // your website url
    'public_key' => env('KHALTI_PUBLIC_KEY', ''), // public key from khalti
    'secret_key' => env('KHALTI_SECRET_KEY', ''), // secret key from khalti
];

Update .env with your khalti credentials

This credentals are provided with merchant dashboard.

set debug flag to false in config to use live khalti

KHALTI_DEBUG=true # Set this flag to false to use khatli in production
KHALTI_PUBLIC_KEY=
KHALTI_SECRET_KEY=

Usage

The basic concept of this package is that you can integrate Khalti ePayment Gateway (NEW) to your laravel applications and initiate/verify transactions

neputertech/khalti 适用场景与选型建议

neputertech/khalti 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.11k 次下载、GitHub Stars 达 13, 最近一次更新时间为 2022 年 08 月 23 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 neputertech/khalti 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 neputertech/khalti 我们能提供哪些服务?
定制开发 / 二次开发

基于 neputertech/khalti 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 1.11k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 13
  • 点击次数: 10
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 13
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-08-23