在支付网关中使用带有选项的curl发布数据

在支付网关中使用带有选项的curl发布数据,curl,payment-gateway,php-curl,Curl,Payment Gateway,Php Curl,我试图发布一些变量到支付网关。我不知道如何发送选项。我在谷歌上搜索了很多,但没有找到任何线索 我得到了类似的职位 程序性 下面是我从文档中获得的代码 curl -k https://sandbox.juspay.in/orders \ -u your_api_key: \ -d "amount=10.00" \ -d "order_id=ord_007" \ -d "customer_id=guest_user_101" \ -d "customer_email=customer@gmail.

我试图发布一些变量到支付网关。我不知道如何发送选项。我在谷歌上搜索了很多,但没有找到任何线索

我得到了类似的职位

程序性

下面是我从文档中获得的代码

curl -k https://sandbox.juspay.in/orders \
-u your_api_key: \
-d "amount=10.00" \
-d "order_id=ord_007" \
-d "customer_id=guest_user_101" \
-d "customer_email=customer@gmail.com" \
-d "customer_phone=919988665522" \
-d "product_id=:pid" \
-d "description=Order Info"

I did this  

/ set post fields
$post = [
    'your_api_key'=>'12345678',
    'amount' => '10.00',
    'order_id' => 'ord_007',
    'customer_id' => 'guest_user_101',
    'customer_email' => 'customer@gmail.com',
    'customer_phone' => '9999999999',
    'product_id' => 'P01',
    'description' => 'Order Info',
];

$ch = curl_init('https://sandbox.juspay.in/orders');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);

// execute!
$response = curl_exec($ch);

// close the connection, release resources used
curl_close($ch);

// do anything you want with your response
var_dump($response);


//I got the response 

string '{"status":"error","error_code":"access_denied"}' (length=47)