PHP code example of lyrasoft / shopgo-ecpay

1. Go to this page and download the library: Download lyrasoft/shopgo-ecpay library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

lyrasoft / shopgo-ecpay example snippets


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
        ]
    ],

// etc/packages/session.php

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

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