duangong0690 2017-08-30 14:21
浏览 78

Laravel Spark,仅在添加订阅计划后显示取消订阅选项

After connecting the stripe payment system with my Laravel Spark installation I quickly setup some subscription options. Next, I subscribed to one of them using the test credit cards. Everything seems fine at the Stripe dashboard. However, if go the subscriptions page, I only see a big CANCEL SUBSCRIPTION button and not the selected subscription as well as the other subscriptions. I didn't touch the Spark components since I'm afraid to break something... so most of the stuff is pretty vanilla except for the configuration input. I checked with Chrome developer and these are the errors that seems to be linked:

app.js:42231 [Vue warn]: Error in render function: "TypeError: Cannot read 
property 'active' of undefined"

found in

---> <SparkUpdateSubscription>
   <SparkSubscription>
     <SparkSettings>
       <Root>
warn @ app.js:42231
app.js:42318 TypeError: Cannot read property 'active' of undefined
at Proxy.render (eval at createFunction (app.js:51564), <anonymous>:2:24583)
at VueComponent.Vue._render (app.js:45869)
at VueComponent.updateComponent (app.js:44288)
at Watcher.get (app.js:44629)
at new Watcher (app.js:44618)
at mountComponent (app.js:44292)
at VueComponent.Vue$3.$mount (app.js:49600)
at VueComponent.Vue$3.$mount (app.js:51803)
at init (app.js:45245)
at createComponent (app.js:46884)

Anyone had this error or have an idea to fix it?

[edit] When I click the cancel button, I don't see any subscriptions at all and have the following error:

Interestingly, when I click the only button (the cancel subscription button) I don't see any subscriptions anymore and have the following error:

app.js:42231 
[Vue warn]: Error in render function: "TypeError: Cannot read property 'name' of undefined"

found in

---> <SparkResumeSubscription>
   <SparkSubscription>
     <SparkSettings>
       <Root>

Thanks in advance

  • 写回答

2条回答 默认 最新

  • drcrc28428 2017-09-15 10:38
    关注

    I just hit this issue too. This was happening because the user you are logged in as has a stripe_plan in the subscriptions table that has been deleted from SparkServiceProvider. As per Laravel Spark docs, do not delete a plan but rather archive it: https://spark.laravel.com/docs/4.0/billing#archiving-plans.

    To resolve the issue, add your previous plan back into the booted() method in app/Providers/SparkServiceProvider.php but with the archived() method chained to it:

    Spark::plan('Plan', 'my-archived-plan')
        ->archived()
        ->price(100)
        ->features([
            'Feature 1',
            'Feature 2',
            'Feature 3',
        ]);
    
    评论

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题