首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >ChargeBee - subscription中断PHP加载页面

ChargeBee - subscription中断PHP加载页面
EN

Stack Overflow用户
提问于 2014-02-23 21:51:47
回答 1查看 394关注 0票数 0

使用他们的建议PHP库进行Chargebee集成。

我在页面顶部有包含语句,以包括库。并设置环境变量,从控制面板复制粘贴测试服务器信息.

无论我尝试什么,当我使用它们的示例代码时,我的页面加载中断,我得到一个白色的屏幕。如果没有这段代码,页面就会很好地加载,所有的dbase调用都能很好地工作。

还有更多关于Chargebee图书馆的事我没有抓到吗?

代码语言:javascript
复制
        (in the top of the php)

                include("/app/includes/chargebee-php-master/lib/ChargeBee.php");

                ChargeBee_Environment::configure("SERVERNAME-test",
                  "test_KEYFROMCONTROLPANEL");


        (inline code in a function)

              $result = ChargeBee_Subscription::create(array(
                      "planId" => "pond_ripple", 
                      "customer" => array(
                        "email" => "john@user.com", 
                        "firstName" => "John", 
                        "lastName" => "Doe", 
                        "phone" => "+1-949-999-9999"
                      ), 
                      "billing_address" => array(
                        "firstName" => "John", 
                        "lastName" => "Doe", 
                        "line1" => "PO Box 9999", 
                        "city" => "Walnut", 
                        "state" => "CA", 
                        "zip" => "91789", 
                        "country" => "US"
                      )
                                      ));
                    $subscription = $result->subscription();
                    $customer = $result->customer();
                    $card = $result->card();
                    $invoice = $result->invoice();


                $sampleString = $customer["id"];
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-02-24 11:19:37

您的包含路径正确吗?

代码语言:javascript
复制
include("/app/includes/chargebee-php-master/lib/ChargeBee.php");

你能交叉检查它是否从一个基本目录开始吗?即。/app/includes/chargebee-php-master/lib/ChargeBee.php还是相对的?即app/includes/chargebee-php-master/lib/ChargeBee.php

如果您的路径是正确的(完整路径),您可以提供错误日志来进一步调试吗?此外,您还需要以$ customer ->id的形式访问ChargeBee customer对象,而不是作为数组访问。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/21975091

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档