定制 peppertech/larapaymongo 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

peppertech/larapaymongo

Composer 安装命令:

composer require peppertech/larapaymongo

包简介

Laravel-Paymongo Payment Integration

README 文档

README

Overview

LaraPaymongo is a PayMongo integration with Laravel. Paymongo currently supports Credit/Debit Cards (Philippines only), GCash and GrabPay Payments. LaraPaymongo provides an easy way to integrate your Laravel website with Paymongo.

Features

  • Ready-made Payment Pages and Purchase Button UI component
  • Laravel routes, controllers views are ready-made - almost plug-and-play.
  • Developers just need to define their application's logic before and after payments are made.

Installation

composer require peppertech/larapaymongo

Configuration

Environment variables

Variable Required Description Default Value
MIX_PAYMONGO_API_URL Yes PayMongo API URL https://api.paymongo.com/v1
MIX_PAYMONGO_PUBLIC_KEY Yes PayMongo Public Key. Values for Test or Live will be provided. none
PAYMONGO_STATEMENT_DESCRIPTOR Yes The string that will appear on customer Billing Statement. This should be different per project. none
PAYMONGO_SECRET_KEY Yes PayMongo Secret Key. Values for Test or Live will be provided. none
PAYMONGO_PUBLIC_KEY Yes PayMongo Public Key. same as MIX_PAYMONGO_PUBLIC_KEY none
PAYMONGO_WEBHOOK_SIG NO PayMongo Webhook Signature. This should be different per project. Generated using PayMongo API only once per project. none

Integration

  • Run the followign command to copy VueJS files and the LaraPaymongoIntegrator class to the main app
php artisan vendor:publish --tag="larapaymongo" --force

LaraPaymongoIntegrator class

The publish command will copy LaraPaymongoIntegrator in /app diectory. This class will contain the necessary logic of your application to be ran before and after payment is done by the user.

  • updateTransactionSourceId() method is called by LaraPaymongo when Source ID needs to be save in database against the Transaction Reference ID (this could be the Order ID in your application).
  • getTransactionDetails() method is called by LaraPaymongo when it needs the Transaction Details for the purchase. This method should query your database to retrive the information.
  • completeTransaction() method is called by LaraPaymongo after the payment is successful.

Vue Components

Vue Components are copied from this package to your app in resources/js/components.

Ready-made Routes and Views

Here are the available routes and views for LaraPaymongo

  • /payment/<referid> The Payment Page, where referid is the Transaction Reference ID.
  • /payment/source/{method}/{referId} URL that gets called to generate a Source ID from Paymongo, when GCash/GrabPay payments are selected, where method can be gcash|grab_pay and referId is the Transaction Reference ID.
  • /payment/verify/{paymentIntentId}, callback URL when Card Payment is successful. where paymentIntentId is Paymongo Payment Intent ID.
  • /payment/details/{referId} callback URL for GCash and GrabPay payments. It can also be used to check the status of the Transaction.

IMPORTANT: The Views/payment.blade.php of this package extends from view/layouts.app of your app, so it should exist in your application's views.

Testing

  • After Installation and Configuration, navigate to http://<your app domain>/payment/111, it should show the Payment Page.
  • Use the Test Credit Card numbers from PayMongo Testing

peppertech/larapaymongo 适用场景与选型建议

peppertech/larapaymongo 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 102 次下载、GitHub Stars 达 8, 最近一次更新时间为 2020 年 12 月 30 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 102
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 5
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 1
  • Forks: 9
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-12-30