【发布时间】:2020-10-18 18:02:10
【问题描述】:
我正在通过此链接 https://www.codexworld.com/paypal-payment-gateway-integration-in-codeigniter/ 集成贝宝。一切正常,完全没有问题。但我必须在 paypal 的配置文件中写入 paypal 的帐户电子邮件。我想给管理员选择,以便他可以更改贝宝帐户。我试图访问 cofing 文件中的数据库,但它给出了错误。 paypal的配置文件如下
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
// ------------------------------------------------------------------------
// Paypal library configuration
// ------------------------------------------------------------------------
// PayPal environment, Sandbox or Live
$config['sandbox'] = TRUE; // FALSE for live environment
$paypal = $this->db->where('set_id',1)->get('settings')->row_array();
// PayPal business email
$config['business'] = $paypal['paypal_accnt'];
// What is the default currency?
$config['paypal_lib_currency_code'] = 'USD';
// Where is the button located at?
$config['paypal_lib_button_path'] = 'assets/images/';
// If (and where) to log ipn response in a file
$config['paypal_lib_ipn_log'] = TRUE;
$config['paypal_lib_ipn_log_file'] = BASEPATH . 'logs/paypal_ipn.log';
我怎样才能做到这一点。任何形式的帮助将不胜感激
【问题讨论】:
-
谢谢,真的很有帮助。
-
随意回答您的问题!
标签: php api codeigniter paypal config