Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 6 |
CRAP | |
0.00% |
0 / 302 |
| StudentExamPaymentService | |
0.00% |
0 / 1 |
|
0.00% |
0 / 6 |
462.00 | |
0.00% |
0 / 302 |
| initiatePayment | |
0.00% |
0 / 1 |
110.00 | |
0.00% |
0 / 86 |
|||
| initiateEnquiry | |
0.00% |
0 / 1 |
6.00 | |
0.00% |
0 / 44 |
|||
| initiatePaymentForTranscript | |
0.00% |
0 / 1 |
6.00 | |
0.00% |
0 / 48 |
|||
| initiateEnquiryForTranscript | |
0.00% |
0 / 1 |
6.00 | |
0.00% |
0 / 37 |
|||
| initiatePaymentForApplications | |
0.00% |
0 / 1 |
12.00 | |
0.00% |
0 / 48 |
|||
| initiateEnquiryForApplications | |
0.00% |
0 / 1 |
6.00 | |
0.00% |
0 / 39 |
|||
| <?php | |
| namespace com\linways\ec\core\service; | |
| use com\linways\base\util\MakeSingletonTrait; | |
| use com\linways\ec\core\dto\StudentExamRegistrationDetails; | |
| use com\linways\core\ams\professional\request\ExecutePaymentRequest; | |
| use com\linways\ec\core\exception\ExamControllerException; | |
| use com\linways\core\ams\professional\service\PaymentGatewayService; | |
| use com\linways\core\ams\professional\dto\PaymentGateway; | |
| use com\linways\ec\core\service\TranscriptApplicationService; | |
| use com\linways\ec\core\service\CommonExamService; | |
| use com\linways\ec\core\constant\ExamPaymentMethodConstants; | |
| class StudentExamPaymentService extends BaseService{ | |
| use MakeSingletonTrait; | |
| /** | |
| * initiate Payment | |
| * @param initiatePayment $studentOnlinePaymentRequest | |
| */ | |
| public function initiatePayment($studentOnlinePaymentRequest, $module = 'STUDENT_FEES',$category = 'EXAM_REGISTRATION'){ | |
| try { | |
| $studentOnlinePaymentRequest = $this->realEscapeObject($studentOnlinePaymentRequest); | |
| $module = $this->realEscapeString($module); | |
| $category = $this->realEscapeString($category); | |
| $txnId = $studentOnlinePaymentRequest->txnId ? $studentOnlinePaymentRequest->txnId : mt_rand(); | |
| $amount = $studentOnlinePaymentRequest->amount; | |
| $searchRequest = new \stdClass; | |
| $searchRequest->studentId = $studentOnlinePaymentRequest->studentId; | |
| $searchRequest->examRegistrationId = $studentOnlinePaymentRequest->examRegistrationId; | |
| $studentDetails = StudentExamRegistrationService::getInstance()->getStudentExamRegistrationTotalFeeDetails($searchRequest); | |
| $exePaymentReq = new ExecutePaymentRequest(); | |
| $exePaymentReq->module = $module; | |
| $exePaymentReq->category = $category; | |
| $exePaymentReq->amount = $amount; | |
| $exePaymentReq->currency = 'INR'; | |
| $exePaymentReq->returnURL = $studentOnlinePaymentRequest->returnURL; | |
| $exePaymentReq->timeStamp = date("d-m-Y"); | |
| $exePaymentReq->txnId = $txnId; | |
| $exePaymentReq->productInfo = 'Exam Registration'; | |
| $exePaymentReq->email = $studentDetails->studentEmail; | |
| $exePaymentReq->phone = $studentDetails->studentMobile; | |
| $exePaymentReq->address1 = "Test address"; | |
| $exePaymentReq->userName = $studentDetails->studentName; | |
| $exePaymentReq->userId = $studentOnlinePaymentRequest->studentId; | |
| $userDfParams = []; | |
| $userDfParams['studentId'] = $studentOnlinePaymentRequest->studentId; | |
| $userDfParams['examRegId'] = $studentOnlinePaymentRequest->examRegistrationId; | |
| $userDfParams['examType'] = $studentDetails->examRegistrationType; | |
| $userDfParams['academicPapSubId'] = $studentOnlinePaymentRequest->academicPaperSubjectId; | |
| $userDfParams['subjectToken'] = $studentOnlinePaymentRequest->subjectToken; | |
| $userDfParams['linwaysTxnId'] = $txnId; | |
| $userDfParams['regNo'] = $studentDetails->studentRegisterNo; | |
| $userDfParams['userName'] = $studentDetails->studentName; | |
| // $userDfParams['examRegType'] = $studentOnlinePaymentRequest->examRegistrationType; | |
| // $userDfParams['isSpecialExam'] = $studentOnlinePaymentRequest->isSpecialExam; | |
| // $userDfParams['email'] = $studentDetails->studentEmail; | |
| // $userDfParams['phone'] = $studentDetails->studentMobile; | |
| // $userDfParams['amount'] = $amount; | |
| // $userDfParams['isEdit'] = $studentOnlinePaymentRequest->isEdit; | |
| $exePaymentReq->userdfParams = $userDfParams; | |
| $revaluationSubjectsArray = []; | |
| if($studentOnlinePaymentRequest->subjects){ | |
| $revaluationSubjectsArray = $studentOnlinePaymentRequest->subjects; | |
| } | |
| $saveOnlinePaymentStatus = new \stdClass; | |
| $saveOnlinePaymentStatus->studentId = $studentOnlinePaymentRequest->studentId; | |
| $saveOnlinePaymentStatus->txnID = $txnId; | |
| $saveOnlinePaymentStatus->status = "PENDING"; | |
| $saveOnlinePaymentStatus->amount = $amount; | |
| $saveOnlinePaymentStatus->transactionDate = date("Y-m-d H:i:s"); | |
| $saveOnlinePaymentStatus->type = "STUDENT_EXAM_REGISTRATION"; | |
| $saveOnlinePaymentStatus->paymentGateWayTransactionId = ""; | |
| $onlinePaymentProperties = new \stdClass; | |
| $onlinePaymentProperties->examRegistrationId = $studentOnlinePaymentRequest->examRegistrationId; | |
| $onlinePaymentProperties->academicPaperSubjectId = $studentOnlinePaymentRequest->academicPaperSubjectId; | |
| if(!empty($revaluationSubjectsArray)){ | |
| $onlinePaymentProperties->revaluationSubjects = $revaluationSubjectsArray; | |
| } | |
| $saveOnlinePaymentStatus->properties = $onlinePaymentProperties; | |
| StudentExamRegistrationService::getInstance()->saveStudentRegistrationOnlinePaymentStatus($saveOnlinePaymentStatus); | |
| $revaluationSubjects = []; | |
| if($studentOnlinePaymentRequest->subjects){ | |
| foreach($studentOnlinePaymentRequest->subjects as $subject){ | |
| $revaluationSubject = new \stdClass(); | |
| $revaluationSubject->id = $subject->academicPaperSubjectId; | |
| foreach($subject->revaluationTypes as $revaluationType){ | |
| $revaluationSubject->revaluationTypes[$revaluationType]->id = $revaluationType; | |
| } | |
| $revaluationSubjects[$revaluationSubject->id] = $revaluationSubject; | |
| } | |
| } | |
| $saveExamRegistrationTotalFee = new StudentExamRegistrationDetails(); | |
| $saveExamRegistrationTotalFee->studentId = $studentOnlinePaymentRequest->studentId; | |
| $saveExamRegistrationTotalFee->examRegistrationId = $studentOnlinePaymentRequest->examRegistrationId; | |
| $saveExamRegistrationTotalFee->totalFee = $studentOnlinePaymentRequest->amount; | |
| $examRegistrationTotalFeeProperties = $studentDetails->studentExamRegDetailProperties ? $studentDetails->studentExamRegDetailProperties : new \stdClass; | |
| $examRegistrationTotalFeeProperties->onlinePaymentStatus = "PENDING"; | |
| $examRegistrationTotalFeeProperties->paymentOption = ExamPaymentMethodConstants::ONLINE_PAYMENT_METHOD; | |
| $examRegistrationTotalFeeProperties->onlinePaymentTransactionId = $txnId; | |
| if($revaluationSubjects){ | |
| $examRegistrationTotalFeeProperties->revaluationSubjects = $revaluationSubjects; | |
| } | |
| $saveExamRegistrationTotalFee->properties = $examRegistrationTotalFeeProperties; | |
| $saveExamRegistrationTotalFee->createdBy = $studentOnlinePaymentRequest->studentId; | |
| $saveExamRegistrationTotalFee->updatedBy = $studentOnlinePaymentRequest->studentId; | |
| StudentExamRegistrationService::getInstance()->saveStudentExamRegistrationDetails($saveExamRegistrationTotalFee); | |
| PaymentGatewayService::getInstance()->executePayment($exePaymentReq); | |
| } | |
| catch (\Exception $e) { | |
| throw new ExamControllerException('Payment Failed ', "ERROR_OCCURRED"); | |
| } | |
| } | |
| /** | |
| * initiate Enquiry | |
| * @param initiateEnquiry $studentOnlinePaymentRequest | |
| */ | |
| public function initiateEnquiry($studentOnlinePaymentRequest, $module = 'STUDENT_FEES',$category = 'EXAM_REGISTRATION'){ | |
| try { | |
| $studentOnlinePaymentRequest = $this->realEscapeObject($studentOnlinePaymentRequest); | |
| $module = $this->realEscapeString($module); | |
| $category = $this->realEscapeString($category); | |
| $txnId = mt_rand(); | |
| $amount = $studentOnlinePaymentRequest->amount; | |
| $searchRequest = new \stdClass; | |
| $searchRequest->studentId = $studentOnlinePaymentRequest->studentId; | |
| $searchRequest->examRegistrationId = $studentOnlinePaymentRequest->examRegistrationId; | |
| $studentDetails = StudentExamRegistrationService::getInstance()->getStudentExamRegistrationTotalFeeDetails($searchRequest); | |
| $exePaymentReq = new ExecutePaymentRequest(); | |
| $exePaymentReq->module = $module; | |
| $exePaymentReq->category = $category; | |
| $exePaymentReq->amount = $amount; | |
| $exePaymentReq->currency = 'INR'; | |
| $exePaymentReq->returnURL = $studentOnlinePaymentRequest->returnURL; | |
| $exePaymentReq->paymentTransactionMode=PaymentGateway::PAYMENT_MODE_INQUIRY; | |
| $exePaymentReq->linwaysTxnId=$studentOnlinePaymentRequest->linwaysTransactionId; | |
| $exePaymentReq->paymentGatewayTxnId=$studentOnlinePaymentRequest->paymentGatewayTxnId; | |
| $exePaymentReq->timeStamp = date("d-m-Y"); | |
| $exePaymentReq->txnId = $txnId; | |
| $exePaymentReq->productInfo = 'Exam Registration'; | |
| $exePaymentReq->email = $studentDetails->studentEmail; | |
| $exePaymentReq->phone = $studentDetails->studentMobile; | |
| $exePaymentReq->address1 = "Test address"; | |
| $exePaymentReq->userName = $studentDetails->studentName; | |
| $exePaymentReq->userId = $studentOnlinePaymentRequest->studentId; | |
| $userDfParams = []; | |
| $userDfParams['studentId'] = $studentOnlinePaymentRequest->studentId; | |
| $userDfParams['examRegId'] = $studentOnlinePaymentRequest->examRegistrationId; | |
| $userDfParams['examType'] = $studentDetails->examRegistrationType; | |
| $userDfParams['enquiryLinwaysTxnId'] = $studentOnlinePaymentRequest->linwaysTransactionId; | |
| $userDfParams['linwaysTxnId'] = $txnId; | |
| $userDfParams['examRegType'] = $studentOnlinePaymentRequest->examRegistrationType; | |
| $userDfParams['academicPapSubId'] = $studentOnlinePaymentRequest->academicPaperSubjectId; | |
| $userDfParams['regNo'] = $studentDetails->studentRegisterNo; | |
| $userDfParams['userName'] = $studentDetails->studentName; | |
| // $userDfParams['email'] = $studentDetails->studentEmail; | |
| // $userDfParams['phone'] = $studentDetails->studentMobile; | |
| // $userDfParams['amount'] = $amount; | |
| // $userDfParams['isEdit'] = $studentOnlinePaymentRequest->isEdit; | |
| $exePaymentReq->userdfParams = $userDfParams; | |
| PaymentGatewayService::getInstance()->executePayment($exePaymentReq); | |
| } | |
| catch (\Exception $e) { | |
| throw new ExamControllerException('Payment Failed ', "ERROR_OCCURRED"); | |
| } | |
| } | |
| /** | |
| * initiate Payment | |
| * @param initiatePayment $studentOnlinePaymentRequest | |
| */ | |
| public function initiatePaymentForTranscript($studentOnlinePaymentRequest, $module = 'STUDENT_FEES',$category = 'EXAM_REGISTRATION'){ | |
| try { | |
| $studentOnlinePaymentRequest = $this->realEscapeObject($studentOnlinePaymentRequest); | |
| $module = $this->realEscapeString($module); | |
| $category = $this->realEscapeString($category); | |
| $txnId = mt_rand(); | |
| $amount = $studentOnlinePaymentRequest->amount; | |
| $requestForTA->studentId = $studentOnlinePaymentRequest->studentId; | |
| $requestForTA->groupId = $studentOnlinePaymentRequest->groupId; | |
| $applicationDetails = reset(TranscriptApplicationService::getInstance()->getTranscriptApplication($requestForTA)); | |
| $studentDetails = CommonExamService::getInstance()->getStudentDetailsByStudentId($studentOnlinePaymentRequest->studentId); | |
| $exePaymentReq = new ExecutePaymentRequest(); | |
| $exePaymentReq->module = $module; | |
| $exePaymentReq->category = $category; | |
| $exePaymentReq->amount = $amount; | |
| $exePaymentReq->currency = 'INR'; | |
| $exePaymentReq->returnURL = $studentOnlinePaymentRequest->returnURL; | |
| $exePaymentReq->timeStamp = date("d-m-Y"); | |
| $exePaymentReq->txnId = $txnId; | |
| $exePaymentReq->productInfo = 'Transcript Application'; | |
| $exePaymentReq->email = $studentDetails->email; | |
| $exePaymentReq->phone = $studentDetails->phone; | |
| $exePaymentReq->address1 = $studentDetails->studentAddress; | |
| $exePaymentReq->userName = $studentDetails->name; | |
| $exePaymentReq->userId = $studentOnlinePaymentRequest->studentId; | |
| $userDfParams = []; | |
| $userDfParams['studentId'] = $studentOnlinePaymentRequest->studentId; | |
| $userDfParams['groupId'] = $studentOnlinePaymentRequest->groupId; | |
| $userDfParams['linwaysTxnId'] = $txnId; | |
| $userDfParams['userName'] = $studentDetails->name; | |
| $userDfParams['examType'] = $studentDetails->examRegistrationType; | |
| // $userDfParams['email'] = $studentDetails->email; | |
| // $userDfParams['phone'] = $studentDetails->phone; | |
| // $userDfParams['amount'] = $amount; | |
| // $userDfParams['isEdit'] = $studentOnlinePaymentRequest->isEdit; | |
| $exePaymentReq->userdfParams = $userDfParams; | |
| $studentTrascriptionApplication = new \stdClass(); | |
| $studentTrascriptionApplication->studentId = $studentOnlinePaymentRequest->studentId; | |
| $studentTrascriptionApplication->groupId = $studentOnlinePaymentRequest->groupId; | |
| $studentTrascriptionApplication->properties = $applicationDetails->properties; | |
| $studentTrascriptionApplication->properties->status = 'Applied'; | |
| $studentTrascriptionApplication->verificationDetails = $applicationDetails->verificationDetails; | |
| $studentTrascriptionApplication->paymentDetails = $applicationDetails->paymentDetails; | |
| $studentTrascriptionApplication->paymentDetails->totalFee = $amount; | |
| $studentTrascriptionApplication->paymentDetails->paymentStatus = 'PENDING'; | |
| TranscriptApplicationService::getInstance()->deleteTranscriptApplication($studentTrascriptionApplication); | |
| TranscriptApplicationService::getInstance()->saveTranscriptApplication($studentTrascriptionApplication); | |
| PaymentGatewayService::getInstance()->executePayment($exePaymentReq); | |
| } | |
| catch (\Exception $e) { | |
| throw new ExamControllerException('Payment Failed ', "ERROR_OCCURRED"); | |
| } | |
| } | |
| /** | |
| * initiate Enquiry | |
| * @param initiateEnquiry $studentOnlinePaymentRequest | |
| */ | |
| public function initiateEnquiryForTranscript($studentOnlinePaymentRequest, $module = 'STUDENT_FEES',$category = 'EXAM_REGISTRATION'){ | |
| try { | |
| $studentOnlinePaymentRequest = $this->realEscapeObject($studentOnlinePaymentRequest); | |
| $module = $this->realEscapeString($module); | |
| $category = $this->realEscapeString($category); | |
| $txnId = mt_rand(); | |
| $amount = $studentOnlinePaymentRequest->amount; | |
| $studentDetails = CommonExamService::getInstance()->getStudentDetailsByStudentId($studentOnlinePaymentRequest->studentId); | |
| $exePaymentReq = new ExecutePaymentRequest(); | |
| $exePaymentReq->module = $module; | |
| $exePaymentReq->category = $category; | |
| $exePaymentReq->amount = $amount; | |
| $exePaymentReq->currency = 'INR'; | |
| $exePaymentReq->returnURL = $studentOnlinePaymentRequest->returnURL; | |
| $exePaymentReq->paymentTransactionMode=PaymentGateway::PAYMENT_MODE_INQUIRY; | |
| $exePaymentReq->linwaysTxnId=$studentOnlinePaymentRequest->linwaysTransactionId; | |
| $exePaymentReq->paymentGatewayTxnId=$studentOnlinePaymentRequest->paymentGatewayTxnId; | |
| $exePaymentReq->timeStamp = date("d-m-Y"); | |
| $exePaymentReq->txnId = $txnId; | |
| $exePaymentReq->productInfo = 'Transcript Application'; | |
| $exePaymentReq->email = $studentDetails->email; | |
| $exePaymentReq->phone = $studentDetails->phone; | |
| $exePaymentReq->address1 = $studentDetails->studentAddress; | |
| $exePaymentReq->userName = $studentDetails->name; | |
| $exePaymentReq->userId = $studentOnlinePaymentRequest->studentId; | |
| $userDfParams = []; | |
| $userDfParams['studentId'] = $studentOnlinePaymentRequest->studentId; | |
| $userDfParams['groupId'] = $studentOnlinePaymentRequest->groupId; | |
| $userDfParams['enquiryLinwaysTxnId'] = $studentOnlinePaymentRequest->linwaysTransactionId; | |
| $userDfParams['linwaysTxnId'] = $txnId; | |
| // $userDfParams['userName'] = $studentDetails->name; | |
| $userDfParams['examType'] = $studentDetails->examRegistrationType; | |
| // $userDfParams['email'] = $studentDetails->email; | |
| // $userDfParams['phone'] = $studentDetails->phone; | |
| // $userDfParams['amount'] = $amount; | |
| // $userDfParams['isEdit'] = $studentOnlinePaymentRequest->isEdit; | |
| $exePaymentReq->userdfParams = $userDfParams; | |
| PaymentGatewayService::getInstance()->executePayment($exePaymentReq); | |
| } | |
| catch (\Exception $e) { | |
| throw new ExamControllerException('Payment Failed ', "ERROR_OCCURRED"); | |
| } | |
| } | |
| /** | |
| * initiate Payment For Applications | |
| * @param initiatePayment $studentOnlinePaymentRequest | |
| */ | |
| public function initiatePaymentForApplications($studentOnlinePaymentRequest, $module = 'STUDENT_FEES',$category = 'EXAM_REGISTRATION'){ | |
| try { | |
| $studentOnlinePaymentRequest = $this->realEscapeObject($studentOnlinePaymentRequest); | |
| $module = $this->realEscapeString($module); | |
| $category = $this->realEscapeString($category); | |
| $txnId = $studentOnlinePaymentRequest->txnId ? $studentOnlinePaymentRequest->txnId : mt_rand(); | |
| $amount = $studentOnlinePaymentRequest->amount; | |
| $studentDetails = CommonExamService::getInstance()->getStudentDetailsByStudentId($studentOnlinePaymentRequest->studentId); | |
| $exePaymentReq = new ExecutePaymentRequest(); | |
| $exePaymentReq->module = $module; | |
| $exePaymentReq->category = $category; | |
| $exePaymentReq->amount = $amount; | |
| $exePaymentReq->currency = 'INR'; | |
| $exePaymentReq->returnURL = $studentOnlinePaymentRequest->returnURL; | |
| $exePaymentReq->timeStamp = date("d-m-Y"); | |
| $exePaymentReq->txnId = $txnId; | |
| $exePaymentReq->productInfo = 'Exam Registration'; | |
| $exePaymentReq->email = $studentDetails->email; | |
| $exePaymentReq->phone = $studentDetails->phone; | |
| $exePaymentReq->userName = $studentDetails->name; | |
| $exePaymentReq->userId = $studentOnlinePaymentRequest->studentId; | |
| $userDfParams = []; | |
| $userDfParams['studentId'] = $studentOnlinePaymentRequest->studentId; | |
| $userDfParams['examType'] = $studentDetails->examRegistrationType; | |
| $userDfParams['applicationId'] = $studentOnlinePaymentRequest->applicationId; | |
| $userDfParams['subjectToken'] = $studentOnlinePaymentRequest->subjectToken; | |
| $userDfParams['linwaysTxnId'] = $txnId; | |
| $userDfParams['regNo'] = $studentDetails->regNo; | |
| $userDfParams['userName'] = $studentDetails->name; | |
| $exePaymentReq->userdfParams = $userDfParams; | |
| $saveOnlinePaymentStatus = new \stdClass; | |
| $saveOnlinePaymentStatus->studentId = $studentOnlinePaymentRequest->studentId; | |
| $saveOnlinePaymentStatus->txnID = $txnId; | |
| $saveOnlinePaymentStatus->status = "PENDING"; | |
| $saveOnlinePaymentStatus->amount = $amount; | |
| $saveOnlinePaymentStatus->transactionDate = date("Y-m-d H:i:s"); | |
| $saveOnlinePaymentStatus->type = "CA_MARK_IMP_MAKE_UP_TEST_APPLICATION"; | |
| $saveOnlinePaymentStatus->paymentGateWayTransactionId = ""; | |
| $onlinePaymentProperties = new \stdClass; | |
| $onlinePaymentProperties->applicationId = $studentOnlinePaymentRequest->applicationId; | |
| $onlinePaymentProperties->applicationType = $studentOnlinePaymentRequest->applicationType; | |
| $saveOnlinePaymentStatus->properties = $onlinePaymentProperties; | |
| StudentExamRegistrationService::getInstance()->saveStudentRegistrationOnlinePaymentStatus($saveOnlinePaymentStatus); | |
| PaymentGatewayService::getInstance()->executePayment($exePaymentReq); | |
| } | |
| catch (\Exception $e) { | |
| throw new ExamControllerException('Payment Failed ', "ERROR_OCCURRED"); | |
| } | |
| } | |
| /** | |
| * initiate Enquiry | |
| * @param initiateEnquiry $studentOnlinePaymentRequest | |
| */ | |
| public function initiateEnquiryForApplications($studentOnlinePaymentRequest, $module = 'STUDENT_FEES',$category = 'EXAM_REGISTRATION'){ | |
| try { | |
| $studentOnlinePaymentRequest = $this->realEscapeObject($studentOnlinePaymentRequest); | |
| $module = $this->realEscapeString($module); | |
| $category = $this->realEscapeString($category); | |
| $txnId = mt_rand(); | |
| $amount = $studentOnlinePaymentRequest->amount; | |
| $studentDetails = CommonExamService::getInstance()->getStudentDetailsByStudentId($studentOnlinePaymentRequest->studentId); | |
| $exePaymentReq = new ExecutePaymentRequest(); | |
| $exePaymentReq->module = $module; | |
| $exePaymentReq->category = $category; | |
| $exePaymentReq->amount = $amount; | |
| $exePaymentReq->currency = 'INR'; | |
| $exePaymentReq->returnURL = $studentOnlinePaymentRequest->returnURL; | |
| $exePaymentReq->paymentTransactionMode=PaymentGateway::PAYMENT_MODE_INQUIRY; | |
| $exePaymentReq->linwaysTxnId=$studentOnlinePaymentRequest->linwaysTransactionId; | |
| $exePaymentReq->paymentGatewayTxnId=$studentOnlinePaymentRequest->paymentGatewayTxnId; | |
| $exePaymentReq->timeStamp = date("d-m-Y"); | |
| $exePaymentReq->txnId = $txnId; | |
| $exePaymentReq->productInfo = 'Transcript Application'; | |
| $exePaymentReq->email = $studentDetails->email; | |
| $exePaymentReq->phone = $studentDetails->phone; | |
| $exePaymentReq->address1 = $studentDetails->studentAddress; | |
| $exePaymentReq->userName = $studentDetails->name; | |
| $exePaymentReq->userId = $studentOnlinePaymentRequest->studentId; | |
| $userDfParams = []; | |
| $userDfParams['studentId'] = $studentOnlinePaymentRequest->studentId; | |
| $userDfParams['groupId'] = $studentOnlinePaymentRequest->groupId; | |
| $userDfParams['enquiryLinwaysTxnId'] = $studentOnlinePaymentRequest->linwaysTransactionId; | |
| $userDfParams['linwaysTxnId'] = $txnId; | |
| $userDfParams['examType'] = $studentDetails->examRegistrationType; | |
| $userDfParams['applicationId'] = $studentOnlinePaymentRequest->applicationId; | |
| $userDfParams['applicationType'] = $studentOnlinePaymentRequest->applicationType; | |
| $exePaymentReq->userdfParams = $userDfParams; | |
| PaymentGatewayService::getInstance()->executePayment($exePaymentReq); | |
| } | |
| catch (\Exception $e) { | |
| throw new ExamControllerException('Payment Failed ', "ERROR_OCCURRED"); | |
| } | |
| } | |
| } |