duanchun6148 2015-07-30 15:58
浏览 45
已采纳

未找到Laravel 5.1 Class中的条纹计费

I'm trying to migrate the my app from Laravel 4.2 to Laravel 5.1. I've a stripe implementation here.

I've a BillingInterface.php and StripeBilling.php in my folder app\Acme\Billing.

I've the BillingServiceProvicer.php in app\Providers

In my PaymentController,I'm trying the following code and I'm getting an error:

use Acme\Billing;

$card = App::make('App\Acme\Billing\BillingInterface');
try {

   $new_card = $card->addcard([
   'customer_id' => $cards->customer_id,
    'token' => Input::get('stripe_token')
 ]);

Error:

ReflectionException in Container.php line 736: Class App\Acme\Billing\BillingInterface does not exist

How can I solve this problem?

  • 写回答

1条回答 默认 最新

  • doujuanqi2909 2015-08-03 16:16
    关注

    This helped me:

    $card = App::make(BillingInterface::class);
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 抖音咸鱼付款链接转码支付宝
  • ¥15 ubuntu22.04上安装ursim-3.15.8.106339遇到的问题
  • ¥15 求螺旋焊缝的图像处理
  • ¥15 blast算法(相关搜索:数据库)
  • ¥15 请问有人会紧聚焦相关的matlab知识嘛?
  • ¥15 网络通信安全解决方案
  • ¥50 yalmip+Gurobi
  • ¥20 win10修改放大文本以及缩放与布局后蓝屏无法正常进入桌面
  • ¥15 itunes恢复数据最后一步发生错误
  • ¥15 关于#windows#的问题:2024年5月15日的win11更新后资源管理器没有地址栏了顶部的地址栏和文件搜索都消失了