【问题标题】:Confused about Paypal SDK's steps to integrate into Laravel?对 Paypal SDK 集成到 Laravel 的步骤感到困惑?
【发布时间】:2014-12-20 00:27:43
【问题描述】:

我正在尝试使用 PayPal's REST API 将 Paypal 包集成到我的 Laravel 应用程序中,但我在他们的某个步骤上遇到了困难,而且似乎没有关于如何执行此操作的文档。

我已经用composer下载并安装了包,但这一步:

* Copy the sample configuration file sdk_config.ini to a location of your choice and let the SDK know your config path using the following define directive.

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

令人困惑。我找到了示例配置文件,但我不确定将它放在我的 laravel 项目中的最佳位置,我也不确定将定义 PHP 命令放在哪里。有什么想法吗?

【问题讨论】:

    标签: php laravel paypal


    【解决方案1】:

    我经常将常见的 3-rd 方 INI 配置文件放在 app/config 目录中,并在 app/start/global.php 中添加 define 语句,如下所示:

    if (!defined('PP_CONFIG_PATH')) 
    {
        define('PP_CONFIG_PATH', app_path('config') . "/sdk_config.ini");
    }
    

    【讨论】:

      猜你喜欢
      • 2022-01-08
      • 2012-01-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-03-15
      • 2018-08-19
      • 2015-02-25
      相关资源
      最近更新 更多