$service = new GatewayService(); $request->Set(GatewayRequest::MERCHANT_ID(), $processor_data['processor_params']['login']); $request->Set(GatewayRequest::MERCHANT_PASSWORD(), $processor_data['processor_params']['transaction_key']); $request->Set(GatewayRequest::MERCHANT_CUSTOMER_ID(), Tygh::$app['session']['auth']['user_id']); $request->Set(GatewayRequest::MERCHANT_INVOICE_ID(), $invoice_no); // BEGIN Risk Management $request->Set(GatewayRequest::SCRUB(), $processor_data['processor_params']['scrubmode']); $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'])) {
public function PerformRebillUpdate($request, $response) { $request->Set(GatewayRequest::TRANSACTION_TYPE(), "REBILL_UPDATE"); // // If there is no prorated charage, just perform the update. // $amount = $request->Get(GatewayRequest::AMOUNT()); if ($amount == NULL || $amount <= 0.0) { return $this->PerformTransaction($request, $response); } // // If there is a charge, perform the update and confirm // the charge. // if (!$this->PerformTransaction($request, $response)) { return FALSE; } return $this->PerformConfirmation($request, $response); }