sajadmaz
Member
این فانکشن رو جایی گذین کن باید مشکلت حل بشه
PHP:
public function sendParams()
{
if ( $this->totalAmont <= 0 or empty($this->action) or empty($this->redirectURL) or empty($this->resNum) or empty($this->merchantID) ) {
$this->setMsg( "Error: function sendParams()" );
return false;
}
$form = "<html>";
$form .= "<body onLoad=\"document.forms['sendparams'].submit();\" >";
$form .= "<form name=\"sendparams\" method=\"POST\" action=\"".$this->action."\" enctype=\"application/x-www-form-urlencoded\" >\n";
foreach ( $this->style as $key=>$val ) {
if( $val != '' ) {
$form .= "<input type=\"hidden\" name=\"$key\" value=\"$val\" />\n";
}
}
$form .= "<input type=\"hidden\" name=\"Amount\" value=\"$this->totalAmont\" />\n";
$form .= "<input type=\"hidden\" name=\"ResNum\" value=\"$this->resNum\" />\n";
$form .= "<input type=\"hidden\" name=\"MID\" value=\"$this->merchantID\" />\n";
$form .= "<input type=\"hidden\" name=\"RedirectURL\" value=\"$this->redirectURL\" />\n";
$form .= "</form>";
$form .= "</body>";
$form .= "</html>";
print $form;
}