i done search tutorial for send post json with curl .. but for this value i cant find in here.. and my question how to convert to array post json in value if like this, and this my value post json
{
"payment_type": "bca_klikpay",
"transaction_details": {
"order_id": "orderid-01",
"gross_amount": 11000
},
"item_details": [
{
"id": "1",
"price": 11000,
"quantity": 1,
"name": "Mobil "
}
],
"customer_details":{
"first_name": "John",
"last_name": "Baker",
"email": "john.baker@email.com",
"phone": "08123456789"
},
"bca_klikpay": {
"description": "Pembelian Barang"
}
}
i done try to php array like this but still error
$item = array('id' => 'id1', 'price' => 11000, 'quantity' => 1 , 'name' => 'Mobil');
$data2 =array('payment_type' => 'bca_klikpay',
'transaction_details' => array('order_id' => 'orderid-01', 'gross_amount' => 11000),
'item_details' => array([$item]),
'customer_details'=> array('first_name' => 'john',
'last_name' => 'baker', 'email' => 'john.baker@email.com', 'phone' => 08123456789),
'bca_klikpay' => array('description' => 'Pembelian Barang'));
maybe someone can help me.. and sory for my bad english
thanks