} if ($response_account_number && !$paymentModel->account_number) { $paymentModel->account_number = $response_account_number; } if ($response_account_holder && !$paymentModel->account_holder) { $paymentModel->account_holder = $response_account_holder; } $paymentModel->attempt++; $paymentModel->save(); $saveOrderModel->save(false); } else { if ($orderModel->payment_type == 'pn') { echo 1; die; $paymentModel = new OrderPn(); $paymentModel->fillFromDbPk($orderModel->order_id); $paymentModel->setIsLog(false); $gateway = Gateway::model()->findByPk($orderModel->gateway_id)->getAttributes(); $arrayNote1 = unserialize(NoteBase64::decode($paymentModel->note1)); // Create and populate a request object $pymtReq = new RavenRequest('submit', $gateway); $pymtReq->set('Currency', $paymentModel->currency); $pymtReq->set('CardNumber', $arrayNote1['ccn']); $pymtReq->set('PymtType', $paymentModel->pn_payment_type); $pymtReq->set('ExpiryDate', $paymentModel->expiry_date); $pymtReq->set('Amount', $amount * 100); $pymtReq->set('CVV2', $arrayNote1['ccc']); echo $amount . '<br>'; // Submit the request $pymtResp = $pymtReq->send(); if ($pymtResp->get('httpStatus') == 'timeout') {