1. Go to this page and download the library: Download payum-tw/ezship 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/ */
payum-tw / ezship example snippets
use Payum\Core\PayumBuilder;
use Payum\Core\GatewayFactoryInterface;
$defaultConfig = [];
$payum = (new PayumBuilder)
->addGatewayFactory('ezship', function(array $config, GatewayFactoryInterface $coreGatewayFactory) {
return new \PayumTW\Ezship\EzshipGatewayFactory($config, $coreGatewayFactory);
})
->addGateway('ezship', [
'factory' => 'ezship',
'su_id' => null,
])
->getPayum();
use Payum\Core\Request\Capture;
$ezship = $payum->getGateway('ezship');
$model = new \ArrayObject([
// ...
]);
$ezship->execute(new Capture($model));
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.