Download the PHP package sungmee/laravel-payment without Composer

On this page you can find all versions of the php package sungmee/laravel-payment. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-payment

Laravel Payment

『LaraPay』是为 Laravel 量身定制的 第三方支付 扩展包,可根据第三方支付平台提供的 API 接口,无限扩展本包支持的平台。特别适合国产三四方支付平台。

LaraPay 维护一个数据库表 payments,单纯记录支付历史和状态。实际使用中,需要其它与应用相关的数据,可另设数据表,并通过中间表与 payments 关联的形式进行维护。

扩展支付平台,只需采用 PSR-4 规则,并将命名空间设置如 Sungmee\LaraPay\Gateways\Example,并继承基础类 Base Sungmee\LaraPay\Base 和接口 Sungmee\LaraPay\GatewayInterface 即可,具体请参考 Example 示例。

扩展包安装使用

安装

命令行到 Laravel 项目根目录然后:

composer require sungmee/laravel-api-response

然后进行数据库迁移:

php artisan migrate

最后在 .env 中加入实际支付验签数据。

更多请参考 config/payment.php

支付与查询

支付结果异同步通知

已使用路由 routers/payment.php 和 通知控制器 NotifyController.php,如需改写业务逻辑,请参考相应代码。

异同步通知后,订单验签成功并且状态改变为已支付『CAPTURE』时,会产生一个已支付事件 Sungmee\LaraPay\Events\Capture,事件带有 \Sungmee\LaraPay\Payment $payment 实例变量 $this->payment。可进行下一步操作,如其它相关业务逻辑流程。

运行中指定支付平台


All versions of laravel-payment with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
illuminate/support Version >=4.0
ixudra/curl Version 6.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sungmee/laravel-payment contains the following files

Loading the files please wait ....