我正在使用 Elavon Converge 付款网关。
我想在提交信用卡详细信息之前验证商家帐户凭据(例如merchant_id,user_id,pin)。
这是我的代码:
$url = 'https://demo.myvirtualmerchant.com/VirtualMerchantDemo/process.do';
$fields = array(
'ssl_merchant_id'=>'XXXXXXXX',
'ssl_user_id'=>'XXXX',
'ssl_pin'=>'XXXXXXX',
'ssl_first_name'=>'Heapdrip',
'ssl_last_name'=>'Heap',
'ssl_show_form'=>'false',
'ssl_result_format'=>'html',
'ssl_test_mode'=>'false',
'ssl_receipt_apprvl_method'=>'redg',
'ssl_receipt_decl_method'=>'REDG',
'ssl_receipt_decl_get_url'=>'RETURN URL AFTER PAYMENT DECLINED',
'ssl_error_url'=>'RETURN URL AFTER PAYMENT ERROR',
'ssl_receipt_apprvl_get_url'=>'RETURN URL AFTER PAYMENT APPROVAL',
'ssl_transaction_type'=>'ccsale',
'ssl_amount'=>'5000',
'ssl_card_number'=>'xxxxxxxxxxxxxxx',
'ssl_exp_date'=>'122022',
'ssl_cvv2cvc2_indicator'=>1,
'ssl_cvv2cvc2'=>123
);
$fields_string = http_build_query($fields);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
$result = curl_exec($ch);
curl_close($ch);
这是直接付款方式,但我想检查merchant_id,user_id和pin是否正确。
答案 0 :(得分:0)
如果您发布到process.do网址并且付款表单出现,那么凭据将被验证,因为如果表单不是,则表单不会被提取。