putting array into deluge for API

putting array into deluge for API



<?php

$domain = "http://demo.connect.easyparcel.my/?ac=";

 

$action = "EPPayOrderBulk";

$postparam = array(

                'api'                                         => 'xxxxxxxx',

                'bulk' => array(

                                                                array(

                                                                'order_no'=>"EI-AAGWD"

                                                                ),

                                                                array(

                                                                'order_no'=>"EI-AAGWD"

                                                                ),

                                                )              

               

);

 

 

$url = $domain.$action;

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);

curl_setopt($ch, CURLOPT_POST, 1);

curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postparam));

curl_setopt($ch, CURLOPT_HEADER, 0);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);

 

ob_start();

$return = curl_exec($ch);

ob_end_clean();

curl_close($ch);

 

$json = json_decode($return);

echo "<pre>"; print_r($json); echo "</pre>";

?>

the code above is in php, but how do i actually put the array part into my code? anyone can shed some light?

my code:

myMap = Map();
myMap .put("api","xxxxxxx");
myMap .put("order_no","EI-AAGWD");
input.Single_Line = val;

thanks in advance,

Jeff