dsbx40787736 2014-08-03 03:40
浏览 55
已采纳

如何配置PayPal PHP SDK

I am making an eCommerce store with the PayPal PHP SDK and I am having difficulties configuring the SDK. In the documentation, it says to use a dedicated config file you have to define the path of it with this line:

    define('PP_CONFIG_PATH', /path/to/your/sdk_config.ini);

I am confused about where I would put that line. Does it need to be in every class that uses the API, or just one central place?

P.S. I noticed in the samples that they used the alternative way of configuring the SDK; use a setConfig() method. However, I only found this used in the sample/bootstrap.php file in the repoisitory. So my question is the same: What would be the use-case of either of those two methods? I am probably missing what I am looking for in the SDK repository, but I thought I would ask people who have done this before.

  • 写回答

1条回答 默认 最新

  • dryl34156 2014-08-03 04:19
    关注

    If you set your define rule on top of your eCommerce software config file, it will be available to the Paypal SDK.

    defined values are usually globally accessible by any file including the original.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料