下面的问题中剪下“Array”,我们刚开始开发支付网关,不幸的是目标API的文档几乎不存在,银行的支持也很糟糕。从邮件信息
在本文档中,下消息格式授权请求,我们发现这个例子:
mid=12345&terminal=1234&version=3.1&command=CRAUTH&ref_no=3421_14120348_14120348&ref_date=20141203061048&service_id=11&cust_id=1&cur_abbr=THB&amount=300.00&backURL=https://www.yourshopreturnurl.com/
因此,我们已经创建了网关(WooCommerce)和使用这种形式通过我们的数组值:
$scb_args_array = array();
foreach($ccavenue_args as $param => $value) { $scb_args_array[] = "$param=$value"; }
$paramsJoinedNew = implode('&', $scb_args_array);
return '<form action="'.$live_url.'" method="post" id="ewire_payment_form">
<input type="hidden" name="bank_Values" value="'. $paramsJoinedNew .'" />
<input type="submit" class="button-alt" id="submit_ewire_payment_form" value="'.__('Pay via bank', 'woothemes').'" /> <a class="button cancel" href="'.$order->get_cancel_order_url().'">'.__('Cancel order & restore cart', 'woothemes').'</a>
</form>';}
这种形式的结果是:
Array ([bank_Values] => mid=12345&terminal=1234&version=3.1&command=CRAUTH&ref_no=3421_14120348_14120348&ref_date=20141203061048&service_id=11&cust_id=1&cur_abbr=THB&amount=300.00&backURL=https://www.yourshopreturnurl.com/ )
提交此给银行,导致银行的空白页面没有任何调试信息。
我们假设ARRAY ([bank_Values] =>
是问题,有没有办法从帖子信息中删除那部分,所以它只发送原始值,就像他们的例子一样?
也可能有人有另一种想法可以解决问题。
谢谢你的帮助!
都能跟得上它不是问题的单独输入字段发送原始数据,那么 - >阵列([bank_Values] – 2014-12-03 06:37:28
你发送'bank_Values = ENCODED_STRING '而不是'a = 1&b = 2&...'。你应该创建N个表单字段,名称为'mid','terminal'等,填充它们的值,然后执行POST(GET?)。 – mudasobwa 2014-12-03 06:42:29
使用HTTP Post在银行的查询字符串中,例如http://www.bank.com/process.do?1&b?2&b ... 但是,看看使用该银行的其他商家,他们似乎分析变量的方式不同(跟踪重定向)在其他商家的网址http://www.bank.com/process.do – 2014-12-03 07:18:52