lyrasoft/shopgo-ecpay

ShopGo Ecpay 包

安装: 592

依赖项: 0

建议者: 0

安全: 0

星标: 0

关注者: 2

分支: 1

开放问题: 3

类型:shopgo-package

1.0.13 2023-08-07 09:45 UTC

This package is auto-updated.

Last update: 2024-09-07 11:57:03 UTC


README

安装

通过 composer 安装

composer require lyrasoft/shopgo-ecpay

注册到 shopgo 配置

use Lyrasoft\ShopGo\Ecpay\EcpayPayment;
use Lyrasoft\ShopGo\Ecpay\EcpayShipping;

return [
    //...

    'shipping' => [
        'types' => [
            // ...
            'ecpay' => EcpayShipping::class, // <-- Add this
        ]
    ],

    'payment' => [
        'types' => [
            // ...
            'ecpay' => EcpayPayment::class, // <-- Add this
        ]
    ],

会话

由于 ShopGo 可能需要重定向到外部支付服务以处理结账,您必须禁用 SameSite Cookie 策略并将 secure 设置为 TRUE

// etc/packages/session.php

return [
    'session' => [
        // ...

        'cookie_params' => [
            // ...
            'secure' => true, // <-- Set this to TRUE
            // ...
            'samesite' => CookiesInterface::SAMESITE_NONE, // Set this to `SAMESITE_NONE`
        ],