mirror of
https://github.com/10h30/vietnam-payment-gateways.git
synced 2026-07-11 18:56:08 +09:00
Bug fix
This commit is contained in:
@@ -26,7 +26,8 @@ function vnpg_add_gateway_class( $gateways ) {
|
||||
add_action( 'plugins_loaded', 'vnpg_init_gateway_class' );
|
||||
function vnpg_init_gateway_class() {
|
||||
class WC_VNPG_YCB extends WC_Payment_Gateway {
|
||||
public function __construct() {
|
||||
|
||||
public function __construct() {
|
||||
$this->id = 'vnpg';
|
||||
$this->icon = apply_filters( 'woocommerce_vnpg_icon', '' );
|
||||
$this->has_fields = false;
|
||||
@@ -123,7 +124,7 @@ function vnpg_init_gateway_class() {
|
||||
* @param int $order_id Order ID.
|
||||
*/
|
||||
public function thankyou_page( $order_id ) {
|
||||
//$this->payment_details( $order_id );
|
||||
$this->payment_details( $order_id );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -134,8 +135,8 @@ function vnpg_init_gateway_class() {
|
||||
* @param bool $plain_text Email format: plain text or HTML.
|
||||
*/
|
||||
public function email_instructions( $order, $sent_to_admin, $plain_text = false ) {
|
||||
if (!$sent_to_admin && 'vnpg' === $order->get_paffyment_method() && $order->has_status('on-hold')) {
|
||||
//$this->payment_details($order->get_id());
|
||||
if (!$sent_to_admin && 'vnpg' === $order->get_payment_method() && $order->has_status('on-hold')) {
|
||||
$this->payment_details($order->get_id());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,14 +146,14 @@ function vnpg_init_gateway_class() {
|
||||
$order = wc_get_order($order_id);
|
||||
|
||||
$html = '<h3>Thông tin thanh toán</h3>';
|
||||
//$html .= '<div>Bạn vui lòng chuyển khoản theo thông tin dưới đây</div>';
|
||||
//$html .= '<ul>';
|
||||
//$html .= '<li class="order-amount">'. $order->get_total() . '</li>';
|
||||
//$html .= '<li class="bank-name">'. $this->bank . '</li>';
|
||||
//$html .= '<li class="account-number">'. $this->account_number . '</li>';
|
||||
//$html .= '<li class="account-name">'. $this->account_name . '</li>';
|
||||
//$html.= '<li class="prefix">'. $this->prefix . $order_id .'</li>';
|
||||
//$html .= '</ul>';
|
||||
$html .= '<div>Bạn vui lòng chuyển khoản theo thông tin dưới đây</div>';
|
||||
$html .= '<ul>';
|
||||
$html .= '<li class="order-amount">'. $order->get_total() . '</li>';
|
||||
$html .= '<li class="bank-name">'. $this->bank . '</li>';
|
||||
$html .= '<li class="account-number">'. $this->account_number . '</li>';
|
||||
$html .= '<li class="account-name">'. $this->account_name . '</li>';
|
||||
$html.= '<li class="prefix">'. $this->prefix . $order_id .'</li>';
|
||||
$html .= '</ul>';
|
||||
|
||||
echo $html;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user