solutionplus/payable

一个用于处理 OTA 支付处理器的 Laravel 扩展包。

1.1.2 2024-08-25 14:56 UTC

README

solutionplus/payable 是一个用于处理特定支付情况的 Laravel 扩展包,并不适合所有需求。

目录

安装

使用方法

许可证

安装

您可以使用 composer 安装此包

# cli commands

composer require solutionplus/payable

使用方法

有一些预定义的方法来执行所需操作

    # create payment request object from payment microservice:
    # `$payableData` should be ['key' => 'value'] pair array which represent inputs in request
    $payable = new Payable($companyReferenceNumber);
    $response = $payable->withHeaders(['X-example' => 'header-value'])->createPaymentRequest($payableData);

// $payableData 验证规则如下

    [
        'gateway' => 'required|string|exists:gateways,name',
        'currency' => 'required|string|exists:currencies,iso_code',
        'amount' => 'required|numeric|min:1|max:9999999999',
        'due_date' => 'required|date_format:Y-m-d H:i:s|after:' . now(),
        'payable_reference_number' => 'sometimes|string|min:10|max:25',

        'name' => 'required|string|min:3|max:225',
        'email' => 'required|email',
        'phone' => 'required|min:1|digits_between:9,15',
        'country_code' => 'required_with:phone|min:3|max:5',
        'street' => 'required|string|min:3|max:20',
        'city' => 'required|string|min:3|max:20',
        'state' => 'required|string|min:3|max:20',
        'country' => 'required|string|min:3|max:20',
        'zip' => 'required|numeric|digits:5',        
    ];

注意

建设中。

许可证

Solutionplus/payable 包是有限制的专有软件,属于 Solutionplus.net 公司。