【问题标题】:php stripe payments APIphp条带支付API
【发布时间】:2018-06-22 10:17:17
【问题描述】:

您好,我正在编写一个简单的测试脚本来研究如何使用 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 我没有使用作曲家。

【问题讨论】:

    标签: payment


    【解决方案1】:

    安装 Stripe 时安装的所有库? https://stripe.com/docs/libraries#php

    以下是准备使用 API 的方法 https://stripe.com/docs/mobile/ios/standard#prepare-your-api

    【讨论】:

      猜你喜欢
      • 2017-10-23
      • 2020-12-24
      • 1970-01-01
      • 2020-03-31
      • 2015-12-26
      • 2021-11-07
      • 2011-10-08
      • 2020-06-11
      • 2016-06-13
      相关资源
      最近更新 更多