Skip to content

Commit 06ef6bd

Browse files
authored
Merge pull request #33 from iamsayan/develop
v1.4.1 added
2 parents c252c43 + 7e5b110 commit 06ef6bd

File tree

11 files changed

+80
-28
lines changed

11 files changed

+80
-28
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
## 1.4.1
5+
Release Date: January 7, 2024
6+
7+
* Fixed: CSS issues.
8+
* Tweak: PHP 8.3 Support.
9+
410
## 1.4.0
511
Release Date: January 6, 2024
612

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array('react', 'react-dom', 'wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities'), 'version' => '0e052535178266cbf1ab');
1+
<?php return array('dependencies' => array('react', 'react-dom', 'wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities'), 'version' => '4723d4f56e6951dfc10c');

includes/blocks/assets/blocks.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

includes/class-payment.php

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,42 @@
1818
*/
1919
class UPI_WC_Payment_Gateway extends \WC_Payment_Gateway {
2020

21+
/**
22+
* Unique id for the gateway.
23+
* @var string
24+
*
25+
*/
26+
public $id = 'wc-upi';
27+
28+
protected $instructions;
29+
protected $instructions_mobile;
30+
protected $confirm_message;
31+
protected $thank_you;
32+
protected $payment_status;
33+
protected $name;
34+
protected $vpa;
35+
protected $pay_button;
36+
protected $mc_code;
37+
protected $upi_address;
38+
protected $require_upi;
39+
protected $theme;
40+
protected $transaction_id;
41+
protected $transaction_image;
42+
protected $intent;
43+
protected $download_qr;
44+
protected $qrcode_mobile;
45+
protected $hide_on_mobile;
46+
protected $email_enabled;
47+
protected $email_subject;
48+
protected $email_heading;
49+
protected $additional_content;
50+
protected $default_status;
51+
2152
/**
2253
* Constructor for the gateway.
2354
*/
2455
public function __construct() {
25-
26-
$this->id = 'wc-upi';
56+
2757
$this->icon = apply_filters( 'upiwc_gateway_icon', UPIWC_URL . 'includes/icon/payment.gif' );
2858
$this->has_fields = true;
2959
$this->method_title = __( 'UPI QR Code', 'upi-qr-code-payment-for-woocommerce' );
@@ -213,7 +243,7 @@ public function init_form_fields() {
213243
'title' => __( 'Thank You Message:', 'upi-qr-code-payment-for-woocommerce' ),
214244
'type' => 'textarea',
215245
'description' => __( 'This displays a message to customer after a successful payment is made.', 'upi-qr-code-payment-for-woocommerce' ),
216-
'default' => __( 'Thank you for your payment. Your transaction has been completed, and your order has been successfully placed. Please check you Email inbox for details. Please check your bank account statement to view transaction details.', 'upi-qr-code-payment-for-woocommerce' ),
246+
'default' => __( 'Thank you for your order. Your transaction has been completed, and order has been successfully placed. Please check you Email inbox for details.', 'upi-qr-code-payment-for-woocommerce' ),
217247
'desc_tip' => false,
218248
),
219249
'hide_on_mobile' => array(
@@ -325,21 +355,21 @@ public function init_form_fields() {
325355
'title' => __( 'Instructions:', 'upi-qr-code-payment-for-woocommerce' ),
326356
'type' => 'textarea',
327357
'description' => __( 'Instructions that will be added to the order pay popup on desktop devices.', 'upi-qr-code-payment-for-woocommerce' ),
328-
'default' => __( 'Scan the QR Code with any UPI apps like BHIM, Paytm, Google Pay, PhonePe or any Banking UPI app to make payment for this order. After successful payment, enter the UPI Reference ID or Transaction Number and your UPI ID in the next screen and submit the form. We will manually verify this payment against your 12-digits UPI Reference ID or Transaction Number (e.g. 301422121258) and your UPI ID.', 'upi-qr-code-payment-for-woocommerce' ),
358+
'default' => __( 'Please scan the QR code with any UPI app to pay for your order. After payment, enter the UPI Reference ID or Transaction Number (e.g. 401422121258) on the next screen. We\'ll manually verify your payment using the provided information.', 'upi-qr-code-payment-for-woocommerce' ),
329359
'desc_tip' => false,
330360
),
331361
'instructions_mobile' => array(
332362
'title' => __( 'Mobile Instructions:', 'upi-qr-code-payment-for-woocommerce' ),
333363
'type' => 'textarea',
334364
'description' => __( 'Instructions that will be added to the order pay popup on mobile devices.', 'upi-qr-code-payment-for-woocommerce' ),
335-
'default' => __( 'Scan the QR Code with any UPI apps like BHIM, Paytm, Google Pay, PhonePe or any Banking UPI app to make payment for this order. After successful payment, enter the UPI Reference ID or Transaction Number and your UPI ID in the next screen and submit the form. We will manually verify this payment against your 12-digits UPI Reference ID or Transaction Number (e.g. 301422121258) and your UPI ID.', 'upi-qr-code-payment-for-woocommerce' ),
365+
'default' => __( 'Please scan the QR code with any UPI app to pay for your order. After payment, enter the UPI Reference ID or Transaction Number (e.g. 401422121258) on the next screen. We\'ll manually verify your payment using the provided information.', 'upi-qr-code-payment-for-woocommerce' ),
336366
'desc_tip' => false,
337367
),
338368
'confirm_message' => array(
339369
'title' => __( 'Confirm Message:', 'upi-qr-code-payment-for-woocommerce' ),
340370
'type' => 'textarea',
341371
'description' => __( 'This displays a message to customer as payment processing text.', 'upi-qr-code-payment-for-woocommerce' ),
342-
'default' => __( 'Click Confirm, only after amount deducted from your account. We will manually verify your transaction. Are you sure?', 'upi-qr-code-payment-for-woocommerce' ),
372+
'default' => __( 'Please ensure that the amount has been deducted from your account before clicking "Confirm". We will manually verify your transaction once submitted.', 'upi-qr-code-payment-for-woocommerce' ),
343373
'desc_tip' => false,
344374
),
345375
'email' => array(
@@ -1028,6 +1058,12 @@ public function render_column( $column_name, $order_object_or_post_id ) {
10281058
echo ( ! empty( $content ) ) ? $content : '';
10291059
}
10301060

1061+
/**
1062+
* Get UPI ID
1063+
*
1064+
* @param WC_Order $order Order data.
1065+
* @return string
1066+
*/
10311067
private function get_vpa( $order ) {
10321068
$payee_vpa = apply_filters( 'upiwc_payee_vpa', $this->vpa, $order );
10331069

includes/css/checkout.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

includes/css/checkout.scss

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,11 @@
8787

8888
&.block {
8989
padding: 8px 12px;
90-
min-height: 42px;
91-
border-top-right-radius: 0;
92-
border-bottom-right-radius: 0;
90+
min-height: 40px;
9391
}
9492
}
9593

96-
.selectize-control:before{
94+
.selectize-control:before {
9795
content: '@';
9896
position: absolute;
9997
display: block;

includes/js/payment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
return false;
66
}
77

8-
let paymentLink = '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;
8+
let paymentLink = 'pay?pa=' + upiwcData.payee_vpa + '&pn=' + upiwcData.payee_name + '&am=' + upiwcData.order_amount + '&tr=' + upiwcData.order_key.replace( 'wc_order_', '' ) + '&mc=' + upiwcData.mc_code + '&orgid=000000&mode=01&cu=INR&tn=' + upiwcData.payee_name + '+OrderId:' + upiwcData.order_number;
99
paymentLink = encodeURI( paymentLink.replace(/\s/g, '') );
1010

1111
$( 'body' ).on( 'contextmenu', '.upiwc-payment-qr-code img', function( e ) {

0 commit comments

Comments
 (0)