Esempio n. 1
0
$request->Set(GatewayRequest::CVV2_CHECK(), 'true');
$request->Set(GatewayRequest::AVS_CHECK(), $processor_data['processor_params']['avsmode']);
// END Risk Management
// Pass requested payment info.
$request->Set(GatewayRequest::CARDNO(), $order_info['payment_info']['card_number']);
$request->Set(GatewayRequest::EXPIRE_MONTH(), $order_info['payment_info']['expiry_month']);
$request->Set(GatewayRequest::EXPIRE_YEAR(), $order_info['payment_info']['expiry_year']);
$request->Set(GatewayRequest::CVV2(), $order_info['payment_info']['cvv2']);
$request->Set(GatewayRequest::AMOUNT(), fn_format_price($order_info['total']));
$request->Set(GatewayRequest::CURRENCY(), $processor_data['processor_params']['currency']);
// Billing address
if (!empty($order_info['b_firstname'])) {
    $request->Set(GatewayRequest::CUSTOMER_FIRSTNAME(), $order_info['b_firstname']);
}
if (!empty($order_info['b_lastname'])) {
    $request->Set(GatewayRequest::CUSTOMER_LASTNAME(), $order_info['b_lastname']);
}
if (!empty($order_info['phone'])) {
    $request->Set(GatewayRequest::CUSTOMER_PHONE_NO(), $order_info['phone']);
}
if (!empty($order_info['b_address'])) {
    $request->Set(GatewayRequest::BILLING_ADDRESS(), $order_info['b_address']);
}
if (!empty($order_info['b_city'])) {
    $request->Set(GatewayRequest::BILLING_CITY(), $order_info['b_city']);
}
if (!empty($order_info['b_state'])) {
    $request->Set(GatewayRequest::BILLING_STATE(), $order_info['b_state']);
}
if (!empty($order_info['b_zipcode'])) {
    $request->Set(GatewayRequest::BILLING_ZIPCODE(), $order_info['b_zipcode']);