diff --git a/.wordpress-org/screenshot-1.png b/.wordpress-org/screenshot-1.png
index 51d0256..8891ed7 100644
Binary files a/.wordpress-org/screenshot-1.png and b/.wordpress-org/screenshot-1.png differ
diff --git a/.wordpress-org/screenshot-2.png b/.wordpress-org/screenshot-2.png
index 3c24ca6..b9c8a16 100644
Binary files a/.wordpress-org/screenshot-2.png and b/.wordpress-org/screenshot-2.png differ
diff --git a/.wordpress-org/screenshot-3.png b/.wordpress-org/screenshot-3.png
index 3134490..17aaf1c 100644
Binary files a/.wordpress-org/screenshot-3.png and b/.wordpress-org/screenshot-3.png differ
diff --git a/.wordpress-org/screenshot-4.png b/.wordpress-org/screenshot-4.png
index e812691..da74c24 100644
Binary files a/.wordpress-org/screenshot-4.png and b/.wordpress-org/screenshot-4.png differ
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ab71658..253c655 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,12 @@
# Changelog
All notable changes to this project will be documented in this file.
+## 1.3.9
+Release Date: January 6, 2024
+
+* Added: Security check on submission.
+* Removed: Inter as default font.
+
## 1.3.8
Release Date: January 5, 2024
diff --git a/includes/class-payment.php b/includes/class-payment.php
index 0228480..cb21c61 100644
--- a/includes/class-payment.php
+++ b/includes/class-payment.php
@@ -384,7 +384,8 @@ public function init_form_fields() {
*/
public function payment_fields() {
global $woocommerce;
- $order_id = $woocommerce->session->order_awaiting_payment;
+
+ $order_id = $woocommerce->session->order_awaiting_payment ?? 0;
if ( $order_id ) {
$order = wc_get_order( $order_id );
@@ -508,9 +509,8 @@ public function payment_scripts() {
return;
}
- wp_register_style( 'upiwc-inter-font', 'https://fonts.googleapis.com/css?family=Inter&display=swap' );
wp_register_style( 'upiwc-jquery-confirm', plugins_url( 'css/jquery-confirm.min.css' , __FILE__ ), array(), '3.3.4' );
- wp_register_style( 'upiwc-payment', plugins_url( 'css/payment.min.css' , __FILE__ ), array( 'upiwc-inter-font', 'upiwc-jquery-confirm' ), UPIWC_VERSION );
+ wp_register_style( 'upiwc-payment', plugins_url( 'css/payment.min.css' , __FILE__ ), array( 'upiwc-jquery-confirm' ), UPIWC_VERSION );
wp_register_script( 'upiwc-qr-code', plugins_url( 'js/easy.qrcode.min.js' , __FILE__ ), array( 'jquery' ), '3.8.3', true );
wp_register_script( 'upiwc-jquery-confirm', plugins_url( 'js/jquery-confirm.min.js' , __FILE__ ), array( 'jquery' ), '3.3.4', true );
@@ -539,6 +539,7 @@ public function payment_scripts() {
'payee_vpa' => $payee_vpa,
'payee_name' => preg_replace('/[^\p{L}\p{N}\s]/u', '', $this->name ),
'is_mobile' => ( wp_is_mobile() ) ? 'yes' : 'no',
+ 'nonce' => wp_create_nonce( 'upiwc' ),
'app_version' => UPIWC_VERSION,
)
);
@@ -759,9 +760,20 @@ public function capture_payment() {
return;
}
+ if ( empty( $_POST['upiwc_nonce'] ) || ! wp_verify_nonce( $_POST['upiwc_nonce'], 'upiwc' ) ) {
+ $title = __( 'Security cheeck failed!', 'upi-qr-code-payment-for-woocommerce' );
+
+ wp_die( $title, get_bloginfo( 'name' ) );
+ exit;
+ }
+
// generate order
- $order_id = wc_get_order_id_by_order_key( sanitize_text_field( $_POST['upiwc_order_key'] ) );
- $order = wc_get_order( $order_id );
+ $order = wc_get_order( absint( $_POST['upiwc_order_id'] ) );
+
+ if ( ! is_a( $order, 'WC_Order' ) ) {
+ $order_id = wc_get_order_id_by_order_key( sanitize_text_field( $_POST['upiwc_order_key'] ) );
+ $order = wc_get_order( $order_id );
+ }
// check if it an order
if ( is_a( $order, 'WC_Order' ) ) {
@@ -786,7 +798,7 @@ public function capture_payment() {
// update post meta
$order->update_meta_data( '_upiwc_order_paid', 'yes' );
- if ( ! empty( $_FILES['upiwc_file'] ) ) {
+ if ( ! empty( $_FILES['upiwc_file'] ) && ! empty( $_FILES['upiwc_file']['name'] ) ) {
$allowed_extensions = array( 'image/jpeg', 'image/png' );
if ( in_array( $_FILES['upiwc_file']['type'], $allowed_extensions ) ) {
diff --git a/includes/css/payment.min.css b/includes/css/payment.min.css
index 2e3e290..3c85063 100644
--- a/includes/css/payment.min.css
+++ b/includes/css/payment.min.css
@@ -1 +1 @@
-.upiwc-section{position:relative;margin-top:10px}.upiwc-section .upiwc-info{display:flex;flex-direction:column;gap:5px;align-items:center;justify-content:center;text-align:center;border-width:1px;border-style:solid;border-color:rgba(84,84,84,.15);-o-border-image:initial;border-image:initial;padding:18px;background-color:#f7f7f7}.upiwc-section .upiwc-info .upiwc-waiting-text{text-transform:uppercase;color:#5a5a5a;font-size:13px;margin:0 0 10px !important}.upiwc-section .upiwc-info .upiwc-buttons{display:flex;flex-direction:row;gap:8px;align-items:center;justify-content:center}.upiwc-section .upiwc-info .upiwc-buttons .btn{margin:0 !important}.upiwc-section .upiwc-info .upiwc-return-link{font-size:12px;cursor:pointer;display:none}.upiwc-section .upiwc-modal-header,.upiwc-section .upiwc-modal-content{display:none !important}.jconfirm{font-family:var(--upiwc-font-family, "Inter", system-ui, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);font-feature-settings:"liga" 0}.jconfirm.jconfirm-dark .jc-bs3-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content{border-color:rgba(122,122,122,.25)}.jconfirm.jconfirm-dark .jc-bs3-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-actions .upiwc-payment-upi-id{background-color:rgba(122,122,122,.3)}.jconfirm.jconfirm-dark .jc-bs3-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-container{border-color:rgba(122,122,122,.25)}.jconfirm.jconfirm-dark .jc-bs3-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-container .upiwc-payment-btn .app-logo{background-color:#dbdbdb}.jconfirm.jconfirm-dark .jc-bs3-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-confirm{color:#fff}.jconfirm.jconfirm-dark .jc-bs3-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-confirm .upiwc-payment-confirm-form label,.jconfirm.jconfirm-dark .jc-bs3-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-confirm .upiwc-payment-confirm-form input{color:#fff}.jconfirm.jconfirm-dark .jc-bs3-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-confirm .upiwc-payment-error{color:#ff7070}.jconfirm.jconfirm-dark .jc-bs3-container .jconfirm-box .jconfirm-buttons .btn.upiwc-amount,.jconfirm.jconfirm-dark .jc-bs3-container .jconfirm-box .jconfirm-buttons .btn.upiwc-back{color:#fff !important}.jconfirm.jconfirm-dark .jc-bs3-container .jconfirm-box .jconfirm-buttons .btn.upiwc-amount .upi-id,.jconfirm.jconfirm-dark .jc-bs3-container .jconfirm-box .jconfirm-buttons .btn.upiwc-back .upi-id{color:#dbdbdb !important}.jconfirm .jconfirm-box-container .jconfirm-box{padding:0}@media only screen and (max-width: 576px){.jconfirm .jconfirm-box-container .jconfirm-box{border-radius:0;width:100% !important}}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-closeIcon{color:#fff;font-size:22px !important}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-title-c{padding:0}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-title-c .jconfirm-title{display:block;background-color:var(--upiwc-theme-color, #0659e3);padding:18px;box-shadow:0px 4px 8px rgba(23,26,30,.15)}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-title-c .jconfirm-title .upiwc-payment-header{display:flex;flex-direction:column;align-items:flex-start;gap:10px;color:#fff}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-title-c .jconfirm-title .upiwc-payment-header .upiwc-payment-merchant-name{font-size:16px;font-weight:600}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-title-c .jconfirm-title .upiwc-payment-header .upiwc-payment-order-info{background-color:rgba(255,255,255,.1);font-size:11px;font-weight:500;padding:2px 10px;display:flex;gap:5px}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-title-c .jconfirm-title .upiwc-payment-header .upiwc-payment-order-info .upiwc-payment-order-id{font-weight:600}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane{margin:0}@media only screen and (max-width: 576px){.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane{height:calc(100vh - 157px)}}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content{display:flex;flex-direction:column;justify-content:center;margin:18px;border:1px solid #d9dadb;gap:15px;padding:18px;text-align:center}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-qr-code{max-width:180px;max-height:180px;margin:0 auto;position:relative;padding:3px;overflow:hidden;margin-bottom:-8px}@media only screen and (max-width: 576px){.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-qr-code{max-width:160px;max-height:160px}}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-qr-code.upiwc-hide{display:none}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-qr-code:before{position:absolute;left:1px;right:1px;top:1px;bottom:1px;border-width:1px;border-style:solid;border-color:#dbdbdb;content:""}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-actions{display:flex;flex-direction:column;gap:15px;justify-content:center;align-items:center;text-align:center}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-actions .upiwc-payment-upi-id{font-size:12px;background-color:rgba(122,122,122,.07);padding:5px 10px;text-transform:uppercase;font-weight:600;line-height:1.5;cursor:pointer}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-actions .upiwc-payment-button{background-color:var(--upiwc-theme-color, #0659e3);padding:8px 15px;font-size:11px;font-weight:500;margin:0;text-transform:initial;color:#fff !important;display:inline-block;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;border-radius:4px;min-height:1em;transition:opacity .1s ease,background-color .1s ease,color .1s ease,box-shadow .1s ease,background .1s ease;-webkit-tap-highlight-color:rgba(0,0,0,0);border:0;background-image:none;height:auto;width:auto}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-actions .upiwc-payment-button:focus{outline:none}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-container{display:flex;flex-direction:column;gap:12px;justify-content:center;align-items:center;text-align:center;border-bottom:1px solid #dddbdb;padding-bottom:20px}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-container .upiwc-payment-hint{font-size:13px;font-weight:600}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-container .upiwc-payment-btn-container{display:flex;flex-direction:row;justify-content:center;align-items:center;text-align:center;gap:15px}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-container .upiwc-payment-btn-container .upiwc-payment-btn{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;gap:5px;font-size:11px;cursor:pointer}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-container .upiwc-payment-btn-container .upiwc-payment-btn .app-logo{display:flex;height:50px;width:50px;border:1px solid #d9dadb;border-radius:6px;padding:10px}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-container .upiwc-payment-btn-container .upiwc-payment-btn .app-logo img{margin:auto}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-container .upiwc-payment-intent-error{color:#d83333;font-size:11px;margin-top:4px}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-info{font-size:12px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:15px;text-align:center}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-info .upiwc-payment-info-text{line-height:1.5}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-info .upiwc-payment-info-logo{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:10px;pointer-events:none}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-info .upiwc-payment-info-logo .logo{width:20px;height:20px}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-confirm{font-size:12px;line-height:1.7;color:#171a1e;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:15px}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-confirm .upiwc-payment-confirm-form-container{display:flex;flex-direction:column;gap:8px}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-confirm .upiwc-payment-confirm-form-container .upiwc-payment-confirm-form{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;gap:14px;margin:0}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-confirm .upiwc-payment-confirm-form-container .upiwc-payment-confirm-form .upiwc-form-row{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-confirm .upiwc-payment-confirm-form-container .upiwc-payment-confirm-form .upiwc-form-row label{font-size:12px;margin-bottom:0}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-confirm .upiwc-payment-confirm-form-container .upiwc-payment-confirm-form .upiwc-form-row label .field-required{color:red}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-confirm .upiwc-payment-confirm-form-container .upiwc-payment-confirm-form .upiwc-form-row input[type=text]{width:80%;text-align:center;display:inline-block;min-height:30px;font-size:13px;line-height:1.8;padding:6px 12px;vertical-align:middle;background-color:rgba(0,0,0,0);color:#333;border:1px solid #ddd;transition:all .3s ease;margin:0}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-confirm .upiwc-payment-confirm-form-container .upiwc-payment-confirm-form .upiwc-form-row input[type=text]:disabled{opacity:.5}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-confirm .upiwc-payment-confirm-form-container .upiwc-payment-confirm-form .upiwc-form-row input[type=file]{width:70%}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-confirm .upiwc-payment-confirm-form-container .upiwc-payment-error{color:#d83333;font-size:11px}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons{box-shadow:0px -1px 10px rgba(23,26,30,.15);padding:10px 14px;margin:-8px 0 0 0;float:none;text-align:center;display:flex;align-items:center;justify-content:space-between}@media only screen and (max-width: 576px){.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons{min-height:68px}}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons .btn{position:relative;font-family:var(--upiwc-font-family, "Inter", system-ui, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);background-color:var(--upiwc-theme-color, #0659e3);padding:11px 20px !important;font-size:12px;font-weight:500;margin:0 !important;text-transform:initial;color:#fff !important;width:auto;height:auto;box-shadow:none}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons .btn:disabled,.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons .btn[disabled]{opacity:.7;pointer-events:none}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons .btn:focus{outline:none}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons .btn:hover{background-color:var(--upiwc-theme-color, #0659e3) !important;color:#fff !important}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons .btn.upiwc-amount{padding:0 !important;background-color:rgba(0,0,0,0);font-size:22px;font-weight:600;color:#171a1e !important;display:flex;flex-direction:column;pointer-events:none}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons .btn.upiwc-amount:hover{background-color:rgba(0,0,0,0) !important}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons .btn.upiwc-amount .upi-id{font-size:11px;color:#6a6a6a}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons .btn.upiwc-back{padding:0 !important;background-color:rgba(0,0,0,0);color:#171a1e !important}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons .btn.upiwc-back:hover{background-color:rgba(0,0,0,0) !important}
\ No newline at end of file
+.upiwc-section{position:relative;margin-top:10px}.upiwc-section .upiwc-info{display:flex;flex-direction:column;gap:5px;align-items:center;justify-content:center;text-align:center;border-width:1px;border-style:solid;border-color:rgba(84,84,84,.15);-o-border-image:initial;border-image:initial;padding:18px;background-color:#f7f7f7}.upiwc-section .upiwc-info .upiwc-waiting-text{text-transform:uppercase;color:#5a5a5a;font-size:13px;margin:0 0 10px !important}.upiwc-section .upiwc-info .upiwc-buttons{display:flex;flex-direction:row;gap:8px;align-items:center;justify-content:center}.upiwc-section .upiwc-info .upiwc-buttons .btn{margin:0 !important}.upiwc-section .upiwc-info .upiwc-return-link{font-size:12px;cursor:pointer;display:none}.upiwc-section .upiwc-modal-header,.upiwc-section .upiwc-modal-content{display:none !important}.jconfirm{font-family:var(--upiwc-font-family, system-ui, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);font-feature-settings:"liga" 0}.jconfirm.jconfirm-dark .jc-bs3-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content{border-color:rgba(122,122,122,.25)}.jconfirm.jconfirm-dark .jc-bs3-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-actions .upiwc-payment-upi-id{background-color:rgba(122,122,122,.3)}.jconfirm.jconfirm-dark .jc-bs3-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-container{border-color:rgba(122,122,122,.25)}.jconfirm.jconfirm-dark .jc-bs3-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-container .upiwc-payment-btn .app-logo{background-color:#dbdbdb}.jconfirm.jconfirm-dark .jc-bs3-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-confirm{color:#fff}.jconfirm.jconfirm-dark .jc-bs3-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-confirm .upiwc-payment-confirm-form label,.jconfirm.jconfirm-dark .jc-bs3-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-confirm .upiwc-payment-confirm-form input{color:#fff}.jconfirm.jconfirm-dark .jc-bs3-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-confirm .upiwc-payment-error{color:#ff7070}.jconfirm.jconfirm-dark .jc-bs3-container .jconfirm-box .jconfirm-buttons .btn.upiwc-amount,.jconfirm.jconfirm-dark .jc-bs3-container .jconfirm-box .jconfirm-buttons .btn.upiwc-back{color:#fff !important}.jconfirm.jconfirm-dark .jc-bs3-container .jconfirm-box .jconfirm-buttons .btn.upiwc-amount .upi-id,.jconfirm.jconfirm-dark .jc-bs3-container .jconfirm-box .jconfirm-buttons .btn.upiwc-back .upi-id{color:#dbdbdb !important}.jconfirm .jconfirm-box-container .jconfirm-box{padding:0}@media only screen and (max-width: 576px){.jconfirm .jconfirm-box-container .jconfirm-box{border-radius:0;width:100% !important}}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-closeIcon{color:#fff;font-size:22px !important}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-title-c{padding:0}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-title-c .jconfirm-title{display:block;background-color:var(--upiwc-theme-color, #0659e3);padding:18px;box-shadow:0px 4px 8px rgba(23,26,30,.15)}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-title-c .jconfirm-title .upiwc-payment-header{display:flex;flex-direction:column;align-items:flex-start;gap:10px;color:#fff}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-title-c .jconfirm-title .upiwc-payment-header .upiwc-payment-merchant-name{font-size:16px;font-weight:600}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-title-c .jconfirm-title .upiwc-payment-header .upiwc-payment-order-info{background-color:rgba(255,255,255,.1);font-size:11px;font-weight:500;padding:2px 10px;display:flex;gap:5px}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-title-c .jconfirm-title .upiwc-payment-header .upiwc-payment-order-info .upiwc-payment-order-id{font-weight:600}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane{margin:0}@media only screen and (max-width: 576px){.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane{height:calc(100vh - 157px)}}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content{display:flex;flex-direction:column;justify-content:center;margin:18px;border:1px solid #d9dadb;gap:15px;padding:18px;text-align:center}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-qr-code{max-width:180px;max-height:180px;margin:0 auto;position:relative;padding:3px;overflow:hidden;margin-bottom:-8px}@media only screen and (max-width: 576px){.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-qr-code{max-width:160px;max-height:160px}}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-qr-code.upiwc-hide{display:none}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-qr-code:before{position:absolute;left:1px;right:1px;top:1px;bottom:1px;border-width:1px;border-style:solid;border-color:#dbdbdb;content:""}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-actions{display:flex;flex-direction:column;gap:15px;justify-content:center;align-items:center;text-align:center}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-actions .upiwc-payment-upi-id{font-size:12px;background-color:rgba(122,122,122,.07);padding:5px 10px;text-transform:uppercase;font-weight:600;line-height:1.5;cursor:pointer}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-actions .upiwc-payment-button{background-color:var(--upiwc-theme-color, #0659e3);padding:8px 15px;font-size:11px;font-weight:500;margin:0;text-transform:initial;color:#fff !important;display:inline-block;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;border-radius:4px;min-height:1em;transition:opacity .1s ease,background-color .1s ease,color .1s ease,box-shadow .1s ease,background .1s ease;-webkit-tap-highlight-color:rgba(0,0,0,0);border:0;background-image:none;height:auto;width:auto}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-actions .upiwc-payment-button:focus{outline:none}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-container{display:flex;flex-direction:column;gap:12px;justify-content:center;align-items:center;text-align:center;border-bottom:1px solid #dddbdb;padding-bottom:20px}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-container .upiwc-payment-hint{font-size:13px;font-weight:600}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-container .upiwc-payment-btn-container{display:flex;flex-direction:row;justify-content:center;align-items:center;text-align:center;gap:15px}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-container .upiwc-payment-btn-container .upiwc-payment-btn{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;gap:5px;font-size:11px;cursor:pointer}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-container .upiwc-payment-btn-container .upiwc-payment-btn .app-logo{display:flex;height:50px;width:50px;border:1px solid #d9dadb;border-radius:6px;padding:10px}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-container .upiwc-payment-btn-container .upiwc-payment-btn .app-logo img{margin:auto}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-container .upiwc-payment-intent-error{color:#d83333;font-size:11px;margin-top:4px}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-info{font-size:12px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:15px;text-align:center}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-info .upiwc-payment-info-text{line-height:1.5}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-info .upiwc-payment-info-logo{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:10px;pointer-events:none}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-info .upiwc-payment-info-logo .logo{width:20px;height:20px}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-confirm{font-size:12px;line-height:1.7;color:#171a1e;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:15px}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-confirm .upiwc-payment-confirm-form-container{display:flex;flex-direction:column;gap:8px}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-confirm .upiwc-payment-confirm-form-container .upiwc-payment-confirm-form{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;gap:14px;margin:0}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-confirm .upiwc-payment-confirm-form-container .upiwc-payment-confirm-form .upiwc-form-row{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-confirm .upiwc-payment-confirm-form-container .upiwc-payment-confirm-form .upiwc-form-row label{font-size:12px;margin-bottom:0}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-confirm .upiwc-payment-confirm-form-container .upiwc-payment-confirm-form .upiwc-form-row label .field-required{color:red}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-confirm .upiwc-payment-confirm-form-container .upiwc-payment-confirm-form .upiwc-form-row input[type=text]{width:80%;text-align:center;display:inline-block;min-height:30px;font-size:13px;font-family:inherit;line-height:1.8;padding:6px 12px;vertical-align:middle;background-color:rgba(0,0,0,0);color:#333;border:1px solid #ddd;transition:all .3s ease;margin:0}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-confirm .upiwc-payment-confirm-form-container .upiwc-payment-confirm-form .upiwc-form-row input[type=text]:disabled{opacity:.5}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-confirm .upiwc-payment-confirm-form-container .upiwc-payment-confirm-form .upiwc-form-row input[type=file]{width:70%;font-size:12px;font-family:inherit}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content .upiwc-payment-content .upiwc-payment-confirm .upiwc-payment-confirm-form-container .upiwc-payment-error{color:#d83333;font-size:11px}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons{box-shadow:0px -1px 10px rgba(23,26,30,.15);padding:10px 14px;margin:-8px 0 0 0;float:none;text-align:center;display:flex;align-items:center;justify-content:space-between}@media only screen and (max-width: 576px){.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons{min-height:68px}}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons .btn{position:relative;font-family:var(--upiwc-font-family, system-ui, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);background-color:var(--upiwc-theme-color, #0659e3);padding:11px 20px !important;font-size:12px;font-weight:500;margin:0 !important;text-transform:initial;color:#fff !important;width:auto;height:auto;box-shadow:none}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons .btn:disabled,.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons .btn[disabled]{opacity:.7;pointer-events:none}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons .btn:focus{outline:none}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons .btn:hover{background-color:var(--upiwc-theme-color, #0659e3) !important;color:#fff !important}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons .btn.upiwc-amount{padding:0 !important;background-color:rgba(0,0,0,0);font-size:22px;font-weight:600;color:#171a1e !important;display:flex;flex-direction:column;pointer-events:none}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons .btn.upiwc-amount:hover{background-color:rgba(0,0,0,0) !important}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons .btn.upiwc-amount .upi-id{font-size:11px;color:#6a6a6a}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons .btn.upiwc-back{padding:0 !important;background-color:rgba(0,0,0,0);color:#171a1e !important}.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons .btn.upiwc-back:hover{background-color:rgba(0,0,0,0) !important}
\ No newline at end of file
diff --git a/includes/css/payment.scss b/includes/css/payment.scss
index 63fd9a7..e68567a 100644
--- a/includes/css/payment.scss
+++ b/includes/css/payment.scss
@@ -48,7 +48,7 @@
}
.jconfirm {
- font-family: var( --upiwc-font-family, "Inter", system-ui, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif );
+ font-family: var( --upiwc-font-family, system-ui, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif );
font-feature-settings: "liga" 0;
&.jconfirm-dark {
@@ -374,6 +374,7 @@
display: inline-block;
min-height: 30px;
font-size: 13px;
+ font-family: inherit;
line-height: 1.8;
padding: 6px 12px;
vertical-align: middle;
@@ -390,6 +391,8 @@
input[type="file"] {
width: 70%;
+ font-size: 12px;
+ font-family: inherit;
}
}
}
@@ -420,7 +423,7 @@
.btn {
position: relative;
- font-family: var( --upiwc-font-family, "Inter", system-ui, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif );
+ font-family: var( --upiwc-font-family, system-ui, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif );
background-color: var( --upiwc-theme-color, #0659e3 );
padding: 11px 20px !important;
font-size: 12px;
diff --git a/includes/js/payment.js b/includes/js/payment.js
index c209dd5..3e508cb 100644
--- a/includes/js/payment.js
+++ b/includes/js/payment.js
@@ -221,7 +221,7 @@
upiForm.attr( 'method', 'POST' );
upiForm.attr( 'enctype', 'multipart/form-data' );
upiForm.attr( 'action', upiwcData.callback_url );
- upiForm.append( '' );
+ upiForm.append( '' );
upiForm.submit();
diff --git a/includes/js/payment.min.js b/includes/js/payment.min.js
index 1d766e0..b347676 100644
--- a/includes/js/payment.min.js
+++ b/includes/js/payment.min.js
@@ -1 +1 @@
-function upiwcIntent(t,e){switch(e){case"gpay":prefix="gpay://upi/";break;case"phonepe":prefix="phonepe://";break;case"paytm":prefix="paytmmp://";break;default:prefix="upi://"}return prefix+t}function upiwcIsNumber(t){t=t||window.event;let e=t.which?t.which:t.keyCode;return!(8!=e&&0!=e&&e>31&&(e<48||e>57))}function upiwcStartTimer(t,e){function n(){i=t-((Date.now()-r)/1e3|0),o=i/60|0,c=i%60|0,o=o<10?"0"+o:o,c=c<10?"0"+c:c,e.textContent="Waiting... ("+o+":"+c+")",i<=0&&(r=Date.now()+1e3)}let i,o,c,a,r=Date.now();clearTimeout(a),n(),a=setInterval(n,1e3),setTimeout(function(){clearTimeout(a)},1e3*t)}(function(t){"use strict";if("undefined"==typeof upiwcData)return!1;let e="pay?pa="+upiwcData.payee_vpa+"&pn="+upiwcData.payee_name+"&am="+upiwcData.order_amount+"&tr="+upiwcData.order_key.replace("wc_order_","")+"&mc="+upiwcData.mc_code+"&cu=INR&tn="+upiwcData.payee_name+"+OrderId:"+upiwcData.order_number;e=encodeURI(e.replace(/\s/g,"")),t("body").on("contextmenu",".upiwc-payment-qr-code img",function(t){return!1}),t("body").on("click","#upiwc-cancel-payment",function(t){t.preventDefault(),window.location=upiwcData.cancel_url}),t("body").on("click",".upiwc-return-link",function(t){t.preventDefault(),window.location=upiwcData.payment_url}),t("body").on("click","#upiwc-confirm-payment",function(n){n.preventDefault();let i='₹ '+upiwcData.order_amount+"";""!=upiwcData.payer_vpa&&(i+=''+upiwcData.payer_vpa+"");let o=t.confirm({title:t("body").find(".upiwc-modal-header").html(),content:t("body").find(".upiwc-modal-content").html(),useBootstrap:!1,animation:"scale",boxWidth:"375px",draggable:!1,offsetBottom:0,offsetTop:0,closeIcon:!0,bgOpacity:.8,lazyOpen:!0,theme:upiwcData.theme,onOpenBefore:function(){this.$el.addClass("upiwc-payment-modal"),t(document).trigger("upiwcOnOpenBefore",[this])},onContentReady:function(){t(document).trigger("upiwcBeforeContentReady",[this]);let n,i,o=this;o.$content.find(".upiwc-payment-upi-id").on("click",function(e){e.preventDefault(),clearTimeout(i),navigator.clipboard.writeText(upiwcData.payee_vpa).then(function(){console.log("Copying to clipboard was successful!")},function(t){console.error("Could not copy text: ",t)});let n=t(this);n.text("Copied!"),i=setTimeout(function(){n.text(upiwcData.payee_vpa)},1e3)}),o.$content.find("#upiwc-payment-transaction-number").on("input",function(t){o.$content.find(".upiwc-payment-error").hide()}),o.$content.find("#upiwc-payment-file").on("change",function(t){o.$content.find(".upiwc-payment-error").hide()});let c=o.$content.find("#upiwc-payment-qr-code img").attr("src");o.$content.find("#upi-download").on("click",function(t){t.preventDefault();let e=document.createElement("a");e.href=c,e.download="QR Code.png",e.click()}),o.$content.find(".upiwc-payment-btn").on("click",function(i){i.preventDefault(),clearTimeout(n),o.$content.find(".upiwc-payment-intent-error").hide();let c=t(this).data("type"),a=window.open(upiwcIntent(e,c));n=setTimeout(function(){a.closed||(a.close(),o.$content.find(".upiwc-payment-intent-error").text("No specified UPI App on this device. Select other UPI option to proceed.").show())},2500)});let a=parseInt(upiwcData.btn_show_interval);a&&a>=1e3?(1==upiwcData.btn_timer&&upiwcStartTimer(a/1e3,document.querySelector(".btn.upiwc-next")),setTimeout(function(){o.buttons.nextStep.setText("Proceed to Next"),o.buttons.nextStep.enable()},a)):(o.buttons.nextStep.setText("Proceed to Next"),o.buttons.nextStep.enable()),t(document).trigger("upiwcAfterContentReady",[this])},onClose:function(){t("#upiwc-processing").hide(),t("#upiwc-confirm-payment, #upiwc-cancel-payment, .upiwc-return-link").show(),t(".upiwc-waiting-text").text("Please click the Pay Now button below to complete the payment against this order."),t(document).trigger("upiwcOnClose",[this])},onAction:function(e){t(document).trigger("upiwcOnAction",[this,e])},buttons:{amount:{text:i,btnClass:"upiwc-amount",action:function(){return!1}},nextStep:{text:"Waiting...",btnClass:"upiwc-next",isDisabled:!0,action:function(){t(document).trigger("upiwcBeforeNextStepAction",[this]);let e=this;return e.$content.find(".upiwc-payment-confirm").show(),e.$content.find(".upiwc-payment-info, .upiwc-payment-qr-code.upiwc-show, .upiwc-payment-actions, .upiwc-payment-container").hide(),e.$closeIcon.hide(),e.buttons.amount.hide(),e.buttons.nextStep.hide(),e.buttons.back.show(),e.buttons.confirm.show(),t(document).trigger("upiwcAfterNextStepAction",[this]),!1}},back:{text:"Back",isHidden:!0,btnClass:"upiwc-back",action:function(){t(document).trigger("upiwcBeforeBackAction",[this]);let e=this;return e.$content.find(".upiwc-payment-confirm").hide(),e.$content.find(".upiwc-payment-info, .upiwc-payment-qr-code.upiwc-show, .upiwc-payment-actions, .upiwc-payment-container").show(),e.buttons.amount.show(),e.buttons.nextStep.show(),e.buttons.back.hide(),e.buttons.confirm.hide(),e.$closeIcon.show(),t(document).trigger("upiwcAfterBackAction",[this]),!1}},confirm:{text:"Confirm",btnClass:"upiwc-confirm",isHidden:!0,action:function(){t(document).trigger("upiwcBeforeConfirmAction",[this]);let e=this,n=e.$content.find("#upiwc-payment-transaction-number"),i=e.$content.find("#upiwc-payment-file");if(n.length>0){let t=n.val();if(""!=t&&12!=t.length)return e.$content.find(".upiwc-payment-error").text("Transaction ID should be of 12 digits!").show(),!1;if("show_require"===upiwcData.transaction_id&&""==t)return e.$content.find(".upiwc-payment-error").text("Transaction ID is required!").show(),!1}if(i.length>0&&"show_require"===upiwcData.transaction_image){var o=i[0];if(!o.files.length)return e.$content.find(".upiwc-payment-error").text("File is required!").show(),!1}n.attr("disabled","disabled"),e.buttons.confirm.disable(),e.buttons.back.disable(),e.buttons.confirm.setText("Processing...");let c=e.$content.find("#upiwc-payment-confirm-form");return c.attr("method","POST"),c.attr("enctype","multipart/form-data"),c.attr("action",upiwcData.callback_url),c.append(''),c.submit(),t(document).trigger("upiwcAfterConfirmAction",[this]),!1}}}});o.open(),t("#upiwc-processing").show(),t("#upiwc-confirm-payment, #upiwc-cancel-payment, .upiwc-return-link").hide(),t(".upiwc-waiting-text").text("Please wait and don't press back or refresh this page while we are processing your payment...")}),t("#upiwc-payment-qr-code").length?new QRCode("upiwc-payment-qr-code",{text:"upi://"+e,width:200,height:200,correctLevel:QRCode.CorrectLevel.H,quietZone:8,onRenderingEnd:function(){t("#upiwc-confirm-payment").trigger("click")}}):t("#upiwc-confirm-payment").trigger("click")})(jQuery);
\ No newline at end of file
+function upiwcIntent(t,e){switch(e){case"gpay":prefix="gpay://upi/";break;case"phonepe":prefix="phonepe://";break;case"paytm":prefix="paytmmp://";break;default:prefix="upi://"}return prefix+t}function upiwcIsNumber(t){t=t||window.event;let e=t.which?t.which:t.keyCode;return!(8!=e&&0!=e&&e>31&&(e<48||e>57))}function upiwcStartTimer(t,e){function n(){i=t-((Date.now()-p)/1e3|0),o=i/60|0,c=i%60|0,o=o<10?"0"+o:o,c=c<10?"0"+c:c,e.textContent="Waiting... ("+o+":"+c+")",i<=0&&(p=Date.now()+1e3)}let i,o,c,a,p=Date.now();clearTimeout(a),n(),a=setInterval(n,1e3),setTimeout(function(){clearTimeout(a)},1e3*t)}(function(t){"use strict";if("undefined"==typeof upiwcData)return!1;let e="pay?pa="+upiwcData.payee_vpa+"&pn="+upiwcData.payee_name+"&am="+upiwcData.order_amount+"&tr="+upiwcData.order_key.replace("wc_order_","")+"&mc="+upiwcData.mc_code+"&cu=INR&tn="+upiwcData.payee_name+"+OrderId:"+upiwcData.order_number;e=encodeURI(e.replace(/\s/g,"")),t("body").on("contextmenu",".upiwc-payment-qr-code img",function(t){return!1}),t("body").on("click","#upiwc-cancel-payment",function(t){t.preventDefault(),window.location=upiwcData.cancel_url}),t("body").on("click",".upiwc-return-link",function(t){t.preventDefault(),window.location=upiwcData.payment_url}),t("body").on("click","#upiwc-confirm-payment",function(n){n.preventDefault();let i='₹ '+upiwcData.order_amount+"";""!=upiwcData.payer_vpa&&(i+=''+upiwcData.payer_vpa+"");let o=t.confirm({title:t("body").find(".upiwc-modal-header").html(),content:t("body").find(".upiwc-modal-content").html(),useBootstrap:!1,animation:"scale",boxWidth:"375px",draggable:!1,offsetBottom:0,offsetTop:0,closeIcon:!0,bgOpacity:.8,lazyOpen:!0,theme:upiwcData.theme,onOpenBefore:function(){this.$el.addClass("upiwc-payment-modal"),t(document).trigger("upiwcOnOpenBefore",[this])},onContentReady:function(){t(document).trigger("upiwcBeforeContentReady",[this]);let n,i,o=this;o.$content.find(".upiwc-payment-upi-id").on("click",function(e){e.preventDefault(),clearTimeout(i),navigator.clipboard.writeText(upiwcData.payee_vpa).then(function(){console.log("Copying to clipboard was successful!")},function(t){console.error("Could not copy text: ",t)});let n=t(this);n.text("Copied!"),i=setTimeout(function(){n.text(upiwcData.payee_vpa)},1e3)}),o.$content.find("#upiwc-payment-transaction-number").on("input",function(t){o.$content.find(".upiwc-payment-error").hide()}),o.$content.find("#upiwc-payment-file").on("change",function(t){o.$content.find(".upiwc-payment-error").hide()});let c=o.$content.find("#upiwc-payment-qr-code img").attr("src");o.$content.find("#upi-download").on("click",function(t){t.preventDefault();let e=document.createElement("a");e.href=c,e.download="QR Code.png",e.click()}),o.$content.find(".upiwc-payment-btn").on("click",function(i){i.preventDefault(),clearTimeout(n),o.$content.find(".upiwc-payment-intent-error").hide();let c=t(this).data("type"),a=window.open(upiwcIntent(e,c));n=setTimeout(function(){a.closed||(a.close(),o.$content.find(".upiwc-payment-intent-error").text("No specified UPI App on this device. Select other UPI option to proceed.").show())},2500)});let a=parseInt(upiwcData.btn_show_interval);a&&a>=1e3?(1==upiwcData.btn_timer&&upiwcStartTimer(a/1e3,document.querySelector(".btn.upiwc-next")),setTimeout(function(){o.buttons.nextStep.setText("Proceed to Next"),o.buttons.nextStep.enable()},a)):(o.buttons.nextStep.setText("Proceed to Next"),o.buttons.nextStep.enable()),t(document).trigger("upiwcAfterContentReady",[this])},onClose:function(){t("#upiwc-processing").hide(),t("#upiwc-confirm-payment, #upiwc-cancel-payment, .upiwc-return-link").show(),t(".upiwc-waiting-text").text("Please click the Pay Now button below to complete the payment against this order."),t(document).trigger("upiwcOnClose",[this])},onAction:function(e){t(document).trigger("upiwcOnAction",[this,e])},buttons:{amount:{text:i,btnClass:"upiwc-amount",action:function(){return!1}},nextStep:{text:"Waiting...",btnClass:"upiwc-next",isDisabled:!0,action:function(){t(document).trigger("upiwcBeforeNextStepAction",[this]);let e=this;return e.$content.find(".upiwc-payment-confirm").show(),e.$content.find(".upiwc-payment-info, .upiwc-payment-qr-code.upiwc-show, .upiwc-payment-actions, .upiwc-payment-container").hide(),e.$closeIcon.hide(),e.buttons.amount.hide(),e.buttons.nextStep.hide(),e.buttons.back.show(),e.buttons.confirm.show(),t(document).trigger("upiwcAfterNextStepAction",[this]),!1}},back:{text:"Back",isHidden:!0,btnClass:"upiwc-back",action:function(){t(document).trigger("upiwcBeforeBackAction",[this]);let e=this;return e.$content.find(".upiwc-payment-confirm").hide(),e.$content.find(".upiwc-payment-info, .upiwc-payment-qr-code.upiwc-show, .upiwc-payment-actions, .upiwc-payment-container").show(),e.buttons.amount.show(),e.buttons.nextStep.show(),e.buttons.back.hide(),e.buttons.confirm.hide(),e.$closeIcon.show(),t(document).trigger("upiwcAfterBackAction",[this]),!1}},confirm:{text:"Confirm",btnClass:"upiwc-confirm",isHidden:!0,action:function(){t(document).trigger("upiwcBeforeConfirmAction",[this]);let e=this,n=e.$content.find("#upiwc-payment-transaction-number"),i=e.$content.find("#upiwc-payment-file");if(n.length>0){let t=n.val();if(""!=t&&12!=t.length)return e.$content.find(".upiwc-payment-error").text("Transaction ID should be of 12 digits!").show(),!1;if("show_require"===upiwcData.transaction_id&&""==t)return e.$content.find(".upiwc-payment-error").text("Transaction ID is required!").show(),!1}if(i.length>0&&"show_require"===upiwcData.transaction_image){var o=i[0];if(!o.files.length)return e.$content.find(".upiwc-payment-error").text("File is required!").show(),!1}n.attr("disabled","disabled"),e.buttons.confirm.disable(),e.buttons.back.disable(),e.buttons.confirm.setText("Processing...");let c=e.$content.find("#upiwc-payment-confirm-form");return c.attr("method","POST"),c.attr("enctype","multipart/form-data"),c.attr("action",upiwcData.callback_url),c.append(''),c.submit(),t(document).trigger("upiwcAfterConfirmAction",[this]),!1}}}});o.open(),t("#upiwc-processing").show(),t("#upiwc-confirm-payment, #upiwc-cancel-payment, .upiwc-return-link").hide(),t(".upiwc-waiting-text").text("Please wait and don't press back or refresh this page while we are processing your payment...")}),t("#upiwc-payment-qr-code").length?new QRCode("upiwc-payment-qr-code",{text:"upi://"+e,width:200,height:200,correctLevel:QRCode.CorrectLevel.H,quietZone:8,onRenderingEnd:function(){t("#upiwc-confirm-payment").trigger("click")}}):t("#upiwc-confirm-payment").trigger("click")})(jQuery);
\ No newline at end of file
diff --git a/readme.txt b/readme.txt
index a2bdbd7..bf9e98a 100644
--- a/readme.txt
+++ b/readme.txt
@@ -106,6 +106,12 @@ Post detailed information about the issue in the [support forum](https://wordpre
If you like UPI QR Code Payment Gateway for WooCommerce, please take a moment to [give a 5-star rating](https://wordpress.org/support/plugin/upi-qr-code-payment-for-woocommerce/reviews/?rate=5#new-post). It helps to keep development and support going strong. Thank you!
+= 1.3.9 =
+Release Date: January 6, 2024
+
+* Added: Security check on submission.
+* Removed: Inter as default font.
+
= 1.3.8 =
Release Date: January 5, 2024