1 Star 0 Fork 0

16wincn / alex-omnipay-plugin-octobercms

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
orig_index.php 739 Bytes
一键复制 编辑 原始数据 按行查看 历史
16wincn 提交于 2021-03-28 09:30 . add files
<?php
require_once('vendor/autoload.php');
use Omnipay\Omnipay;
// Setup payment gateway
$gateway = Omnipay::create('Mollie');
$gateway->setApiKey('test_FfbbNpApf9NkQsMB5skgkkfa4Qn86z');
$response = $gateway->purchase(
[
"amount" => "10.00",
"currency" => "USD",
"description" => "My first Payment",
"returnUrl" => "https://web4theme.com/mollie-return.php"
]
)->send();
// Process response
if ($response->isSuccessful()) {
// Payment was successful
print_r($response);
} elseif ($response->isRedirect()) {
//print_r($response);
// Redirect to offsite payment gateway
$response->redirect();
} else {
// Payment failed
echo $response->getMessage();
}
PHP
1
https://gitee.com/www16wincn/alex-omnipay-plugin-octobercms.git
git@gitee.com:www16wincn/alex-omnipay-plugin-octobercms.git
www16wincn
alex-omnipay-plugin-octobercms
alex-omnipay-plugin-octobercms
master

搜索帮助