Exemplo n.º 1
0
    $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']);
}
if (!empty($order_info['b_country'])) {
    $request->Set(GatewayRequest::BILLING_COUNTRY(), $order_info['b_country']);
}
if (!empty($order_info['email'])) {
    $request->Set(GatewayRequest::EMAIL(), $order_info['email']);
}
if ($processor_data['processor_params']['mode'] == 'test') {
    $service->SetTestMode(TRUE);
}
if ($transaction_types[$trans_type] == 'AUTH_CAPTURE') {
    $service_response = $service->PerformPurchase($request, $response);
    $transaction_type = 'sale';
} elseif ($transaction_types[$trans_type] == 'AUTH_ONLY') {
    $service_response = $service->PerformAuthOnly($request, $response);