首页 > 解决方案 > codegniter 3 莫莉问题

问题描述

我正在尝试在 codeIgniter 中集成 mollie 支付网关

但它给了我这个错误

你好世界

遇到 PHP 错误 严重性:警告

消息:包括(/home/public_html/vendor/composer/../../src/MollieApiClient.php):无法打开流:没有这样的文件或目录

文件名:composer/ClassLoader.php

行号:480

回溯:

文件:/home/public_html/vendor/composer/ClassLoader.php 行:480 功能:_error_handler

文件:/home/public_html/vendor/composer/ClassLoader.php 行:480 功能:包含

文件:/home/public_html/vendor/composer/ClassLoader.php 行:346 功能:Composer\Autoload\includeFile

<html>
<head>
    <title>PHP Test</title>
</head>
<body>
<?php
use Mollie\Api\MollieApiClient;
echo '<p>Hello World</p>';


include_once('vendor/autoload.php');


$mollie = new \Mollie\Api\MollieApiClient();
$mollie->setApiKey("test_APiKEY");
echo '<p>Hello World</p>';

$payment = $mollie->payments->create([
    "amount" => [
        "currency" => "EUR",
        "value" => "123.00"
    ],
    "description" => "My first API payment",
    "redirectUrl" => "https://webshop.example.org/order/12345/",
    "webhookUrl"  => "https://webshop.example.org/mollie-webhook/",
]);
header("Location: " . $payment->getCheckoutUrl() );
echo '<p>Hello World</p>';
?>
</body>
</html>

标签: phpcodeigniter

解决方案


推荐阅读