redkooala/omnipay-best2pay

Best2Pay 的 Omnipay 驱动程序

1.0.6 2020-03-31 12:26 UTC

README

简介

此包支持 PHP 7.1 及以上版本

下载

Composer

// This assumes that you have composer installed globally
composer require redkooala/omnipay-best2pay

最小稳定性解决方法问题

添加到您的 composer.json 文件中

{
  "minimum-stability":"dev",
  "prefer-stable": true
}

简单示例

use Omnipay\Omnipay;

// Setup payment gateway
$gateway = Omnipay::create('Best2Pay');

// Set params for authorize request
$gateway->authorize(
    [
       'orderNumber' => $localOrderNumber, // local order number
       'amount' => $order_amount, // The amount of payment (you can use decimal with 2 precisions for copecs or string equal to decimal)
       'returnUrl' => $callback_url // succesfull callback url
       'currency' => 'RUB',
       'description' => 'merchant order description',
    ]
);