I am using curl for get data from third party,I am sending parameters in json ,Now i want to send dynamic value instead of static,So i want to cocatenate php variable in json but its not working,How can i do this ? I tried to send paramete with "json_encode" but not worked for me, here is my code
CURLOPT_POSTFIELDS => "{\"amount\":1,\"currency\":\"KWD\",\"threeDSecure\":true,\"save_card\":false,\"description\":\"Test Description\",\"statement_descriptor\":\"Sample\",\"metadata\":{\"udf1\":\"test 1\",\"udf2\":\"test 2\"},\"reference\":{\"transaction\":\"txn_0001\",\"order\":\"ord_0001\"},\"receipt\":{\"email\":true,\"sms\":true},\"customer\":{\"first_name\":\"test\",\"middle_name\":\"test\",\"last_name\":\"test\",\"email\":\"abc@xyz.com\",\"phone\":{\"country_code\":\"965\",\"number\":\"50000000\"}},\"source\":{\"id\":\"src_all\"},\"post\":{\"url\":\"http:xxxxxxxxxxx/payment_gateway/data.php\"},\"redirect\":{\"url\":\"http://xxxxxxxx/success.php\"}}",