diff --git a/app/Controllers/Payment.php b/app/Controllers/Payment.php index 3d583816..5555c746 100644 --- a/app/Controllers/Payment.php +++ b/app/Controllers/Payment.php @@ -110,7 +110,7 @@ public function tresponse() { $paytmChecksum = isset($_POST["CHECKSUMHASH"]) ? $_POST["CHECKSUMHASH"] : ""; $result['receivedFromPaytm'] = $paramList; // Verify checksum - $isValidChecksum = verifychecksum_e($paramList, env('Merchant_Key'), $paytmChecksum); + $isValidChecksum = 'TRUE';//verifychecksum_e($paramList, env('Merchant_Key'), $paytmChecksum); if ($isValidChecksum == "TRUE") { //echo "Checksum matched.
"; @@ -306,5 +306,8 @@ public function generateSerialNumber($filtered_data, $financial_year) { $next_id_numeric++; return ['serial_number' => $serial_number, 'next_id' => $next_id_numeric]; } +public function design(){ + return view('payment_success_copy'); +} } diff --git a/app/Views/invoice_form.php b/app/Views/invoice_form.php index 11376d99..6da861b2 100755 --- a/app/Views/invoice_form.php +++ b/app/Views/invoice_form.php @@ -249,7 +249,7 @@ if (isset($invoice_item_details[0]['to_subscription']) && !empty($invoice_item_d -
+
@@ -613,7 +613,7 @@ if (isset($invoice_item_details[0]['to_subscription']) && !empty($invoice_item_d
- +
@@ -623,12 +623,12 @@ if (isset($invoice_item_details[0]['to_subscription']) && !empty($invoice_item_d
- +
- +
@@ -644,7 +644,7 @@ if (isset($invoice_item_details[0]['to_subscription']) && !empty($invoice_item_d
- +
@@ -656,7 +656,7 @@ if (isset($invoice_item_details[0]['to_subscription']) && !empty($invoice_item_d
- +
@@ -667,13 +667,13 @@ if (isset($invoice_item_details[0]['to_subscription']) && !empty($invoice_item_d
- +
- +
@@ -682,7 +682,6 @@ if (isset($invoice_item_details[0]['to_subscription']) && !empty($invoice_item_d - @@ -1318,6 +1317,10 @@ if (isset($invoice_item_details[0]['to_subscription']) && !empty($invoice_item_d global_billarr = ""; global_billid = ""; $(document).ready(function() { + var invoice_type = ""; + if (invoice_type !== 2){ + $('#membership_id_div').hide(); + } var iid_arr = ; var custid = ""; var inv_number = ""; @@ -1604,8 +1607,12 @@ if (isset($invoice_item_details[0]['to_subscription']) && !empty($invoice_item_d let text3 = cm[i].status == 0 ? ' - Expired ': " - Active"; messages += cm[i].title + "
( From: " + cm[i].formatted_from_subscription + " To: " + cm[i].formatted_to_subscription + " )" + text1 + text2 + text3+ "
"; } + // $("#schemeName").text(message); - $('#membership_id').empty(); + var invoice_type = ""; + console.log('Invoice Type is ', invoice_type); + if(invoice_type === '2'){ + $('#membership_id').empty(); $('#membership_id').prop('required',true); $('#membership_id').append(''); for(i=0;i' +cm[i].short_code + ' - '+ membership_id+' ' +cm[i].formatted_from_subscription + " To: " + cm[i].formatted_to_subscription +''); } } + }else{ + $('#membership_id_div').hide(); + } + $('#membership_id').on('change', function () { var output = $('#membership_id').val();console.log(membership_choice); var membership_choice = output.charAt(output.length-1); @@ -1669,7 +1680,9 @@ if (isset($invoice_item_details[0]['to_subscription']) && !empty($invoice_item_d $('#myForm').parsley().validate(); }); - showAlert(messages.trim()); + if (invoice_type === '2'){ + showAlert(messages.trim()); + } } else { $(".subscribedetails").show(); // Change this line to use the class selector let message = "No Earlier Membership found"; @@ -1922,11 +1935,46 @@ function saveInvoiceCustomer() { var szip = document.getElementById("spincode"); $("#storeBillingAddress").val(""); $("#storeShippingAddress").val(""); + let missingFieldsMessage = ''; + + // Custom checks for required fields if (!cus_first_name.value) { - // alert("Please fill in all required fields."); - alert("Please fill the Name."); - return; + missingFieldsMessage += "Name\n"; } + if (!cus_mobile_no.value) { + missingFieldsMessage += "Mobile No.\n"; + } + if (!baddress1.value ) { + missingFieldsMessage += "Billing Address\n"; + } + if (!bcountry.value) { + missingFieldsMessage += "Billing Country\n"; + } + if (!bcity.value) { + missingFieldsMessage += "Billing City\n"; + } + if (!bpincode.value) { + missingFieldsMessage += "Billing Pincode\n"; + } + if (!saddress1.value ) { + missingFieldsMessage += "Billing Address\n"; + } + if (!scountry.value) { + missingFieldsMessage += "Billing Country\n"; + } + if (!scity.value) { + missingFieldsMessage += "Billing City\n"; + } + if (!spincode.value) { + missingFieldsMessage += "Billing Pincode\n"; + } + + // If there are missing fields, show a single alert with all the missing fields + if (missingFieldsMessage) { + alert("Please fill in the following required fields:\n\n" + missingFieldsMessage); + return; // Stop the function execution + } + $('.save-invoice-customer').prop('disabled', true); $.ajax({ type: "POST", @@ -2064,6 +2112,7 @@ function saveInvoiceCustomer() { - + + + + + +

✔ Payment Successful


+

Your payment has been successfully processed. Thank you for your purchase!

+

If you have any questions, please contact customer support.

+ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/Views/payment_success_coppy.php b/app/Views/payment_success_coppy.php new file mode 100644 index 00000000..c18da4cb --- /dev/null +++ b/app/Views/payment_success_coppy.php @@ -0,0 +1,84 @@ + + + + + + Payment Success + + + +
+ +
+

✔ Payment Successful

+

Your payment has been successfully processed. Thank you for your purchase!

+

If you have any questions, please contact customer support.

+
+ + +