Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/variables/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何在CodeIgniter中配置Paypal_Php_Codeigniter_Paypal_Paypal Sandbox_Paypal Rest Sdk - Fatal编程技术网

Php 如何在CodeIgniter中配置Paypal

Php 如何在CodeIgniter中配置Paypal,php,codeigniter,paypal,paypal-sandbox,paypal-rest-sdk,Php,Codeigniter,Paypal,Paypal Sandbox,Paypal Rest Sdk,我下载了这个,并用简单的php对它进行了测试,但我不知道将这些文件放在CodeIgniter的哪个文件夹中 任何帮助都将不胜感激。请参阅此https://developer.paypal.com/docs/checkout/reference/server-integration/setup-sdk/#@MohammadImran是的,我跟踪了此链接,但它不在codeigniter中。我应该在哪里保存composer paypal文件?将SDK安装到应用程序文件夹中编写器需要paypal/pa

我下载了这个,并用简单的php对它进行了测试,但我不知道将这些文件放在CodeIgniter的哪个文件夹中


任何帮助都将不胜感激。请参阅此
https://developer.paypal.com/docs/checkout/reference/server-integration/setup-sdk/#
@MohammadImran是的,我跟踪了此链接,但它不在codeigniter中。我应该在哪里保存composer paypal文件?将SDK安装到应用程序文件夹中<代码>编写器需要paypal/paypal checkout sdk 1.0.1
$config['composer\u autoload']
TRUE
或自定义路径。如何替换命名空间并使用关键字?他们犯了错误
`Creating an Order
Code:
// Construct a request object and set desired parameters
// Here, OrdersCreateRequest() creates a POST request to /v2/checkout/orders
use PayPalCheckoutSdk\Orders\OrdersCreateRequest;
$request = new OrdersCreateRequest();
$request->prefer('return=representation');
$request->body = [
                     "intent" => "CAPTURE",
                     "purchase_units" => [[
                         "reference_id" => "test_ref_id1",
                         "amount" => [
                             "value" => "100.00",
                             "currency_code" => "USD"
                         ]
                     ]],
                     "application_context" => [
                          "cancel_url" => "https://example.com/cancel",
                          "return_url" => "https://example.com/return"
                     ] 
                 ];

try {
    // Call API with your client and get a response for your call
    $response = $client->execute($request);

    // If call returns body in response, you can get the deserialized version from the result attribute of the response
    print_r($response);
}catch (HttpException $ex) {
    echo $ex->statusCode;
    print_r($ex->getMessage());
}`.