/** * Process a risk information notification request * * @param array $data The google request array * * @return void **/ private function ProcessRiskInformation($data) { $googleid = $data['google-order-number']['VALUE']; $orderid = $this->GetOrderIdByGoogleId($googleid); if ($orderid === false) { return; } $approveProtected = (bool) ($this->module->GetValue('autoapproveprotected') === 'YES'); if ($data['risk-information']['eligible-for-protection']['VALUE'] == 'true' && $approveProtected) { UpdateOrderStatus($orderid, ORDER_STATUS_AWAITING_FULFILLMENT, false, true); } // We only get the customers actual ip when we get the risk information so make sure we update the order with it UpdateOrderIpAddress($orderid, $data['risk-information']['ip-address']['VALUE']); }
/** * Process a risk information notification request * * @param array $data The google request array * * @return void **/ private function ProcessRiskInformation($orderId, $riskInformation) { if ($orderId === false) { return; } $approveProtected = (bool) ($this->module->GetValue('autoapproveprotected') === 'YES'); if ($approveProtected && $riskInformation['eligible-for-protection']['VALUE'] == 'true') { UpdateOrderStatus($orderId, ORDER_STATUS_AWAITING_FULFILLMENT, false, false); } // We only get the customers actual ip when we get the risk information so make sure we update the order with it UpdateOrderIpAddress($orderId, $riskInformation['ip-address']['VALUE']); }