【发布时间】:2015-08-06 08:46:03
【问题描述】:
我已将 Stripe 库添加到我的 composer.json 文件中,运行所有命令只是为了检查...更新、转储自动加载等。
在我的类映射文件中显示了库:
'Stripe\\Account' => $vendorDir . '/stripe/stripe-php/lib/Account.php',
等等……
在我的应用程序文件夹中,我有我的类文件夹等:
app
motivate
Billing
BillingInterface.php
StripeBilling.php
在我的 StripeBilling 文件中,我这样引用 Stripe:
<?php
namespace Motivate\Billing;
class StripeBilling implements BillingInterface
{
public function __construct()
{
Stripe::setApiKey(Config::get('stripe.secret_key'));
}
这会引发错误:
Class 'Motivate\Billing\Stripe' not found
所以我的下一个想法是:
use \Stripe as Stripe;
返回类 Stripe not found。
这是哪里出了问题?谢谢:)
【问题讨论】:
标签: php laravel-4 stripe-payments