payment - php条带支付API
问题描述
您好,我正在编写一个简单的测试脚本来查看使用 Stripe 付款。我有以下配置文件:
<?php
//require_once('vendor/autoload.php');
//require('stripe-php-master/lib/stripe.php');
$stripeClassesDir = __DIR__ . '/stripe-php-master/lib/';
$stripeUtilDir = $stripeClassesDir . 'Util/';
$stripeErrorDir = $stripeClassesDir . 'Error/';
set_include_path($stripeClassesDir . PATH_SEPARATOR . $stripeUtilDir . PATH_SEPARATOR . $stripeErrorDir);
function __autoload($class)
{
$parts = explode('\\', $class);
require end($parts) . '.php';
}
$stripe = array(
"secret_key" => "123",
"publishable_key" => "456"
);
\Stripe\Stripe::setApiKey($stripe['secret_key']);
?>
我暂时更换了钥匙。但是,当我使用它时,“用卡付款”按钮似乎可以工作,但我收到错误:require(Request.php): failed to open stream: No such file or directory 我没有使用 Composer。
解决方案
安装 Stripe 时安装的所有库? https://stripe.com/docs/libraries#php
以下是准备使用 API 的方法 https://stripe.com/docs/mobile/ios/standard#prepare-your-api
推荐阅读
- java - 如何将这种广度优先搜索转换为 Java 中的静态方法?
- javascript - 找不到模块“../constants/links”的声明文件 | src/constants/links.js' 隐含一个 'any' 类型
- php - 会话值到数组
- python - 如何在 JSON 文件中按字母顺序按一个字符串对列表进行排序
- html - 如何解决具有背景 div 的 2 列布局中的高度自动问题
- python - 将 Selenium CSV 下载到 python 变量中
- python - 将高度作为值放入另一列
- c# - 在 C# 中使用 APNS 推送进行编码
- javascript - TypeError:无法读取未定义的属性“oldRole”
- angular - 返回成功的 Observable On Route Resolve Call Failure?