سلام من میخوام برای سایتی که ساختم درگاه پرداخت اضافه کنم داکیومنتش اینه ولی نمیدونم باهاش چکار کنم.

function send($merchant,$amount,$callback,$description=null ,$orderId=null){
$payment_gateway_url = "https://sepordeh.com/";
$parameters = array(
"merchant"=>$merchant,
"amount"=>$amount,
"callback"=>$callback,
"description"=>$description,
"orderId"=>$orderId
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $payment_gateway_url."/merchant/invoices/add");
curl_setopt($ch, CURLOPT_POSTFIELDS, $parameters);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
if(!!curl_errno($ch)){
die("CURL ERROR:".curl_error($ch));
}else{
$result = json_decode($result);
if($result->status==200)
header('Location: '.$payment_gateway_url.'/merchant/invoices/pay/automatic:true/id:'.$result->information->invoice_id, true, 302);
else
die("WEBSERVICE ERROR:".$result->message);
}
curl_close($ch);
}