<?php
require_once 'braintree-php-2.14.0/lib/Braintree.php';
require_once __DIR__ . 'silex/vendor/autoload.php';
Braintree_Configuration::environment('sandbox');
Braintree_Configuration::merchantId('...');
Braintree_Configuration::publicKey('...');
Braintree_Configuration::privateKey('...');
$app = new Silex\Application();
$app->get('/', function () {
include 'views/form.php';
});
$app->run();
//$app->get("/braintree-php-2.14.0", function () {
$app->get("/braintree", function () {
include 'views/response.php';
});
?>
这是 Braintree 支付系统,我清楚地阅读了文档但没有解决。在第 14 行发现错误:$app->get("/braintree", function () {