= $this -> order['payment_method_id'] == 6 ? 'Zapłać za pomocą PAYPO' : ucfirst( \S::lang( 'platnosc-online' ) );?>:
if ( $this -> order['payment_method_id'] == 1 or $this -> order['payment_method_id'] == 3 ):?>
Co prawda nie wybrałeś żadnej z dostępnych form "szybkich płatności", ale w każdej chwili możesz z nich skorzystać.
endif;?>
if ( ( $this -> order['payment_method_id'] == 2 or $this -> order['payment_method_id'] == 1 or $this -> order['payment_method_id'] == 3 ) and \front\factory\ShopPaymentMethod::is_payment_active( 2 ) ):?>
endif;?>
if ( $this -> order['payment_method_id'] == 6 and \front\factory\ShopPaymentMethod::is_payment_active( 6 ) ):?>
global $mdb;
$przelewy24_hash = md5( time() );
$mdb -> update( 'pp_shop_orders', [ 'przelewy24_hash' => $przelewy24_hash ], [ 'id' => $this -> order['id'] ] );
?>
endif;?>
if ( $this -> order['payment_method_id'] == 6 ):?>
lub skorzystaj z płatności online
endif;?>
if ( ( $this -> order['payment_method_id'] == 6 or $this -> order['payment_method_id'] == 4 or $this -> order['payment_method_id'] == 1 or $this -> order['payment_method_id'] == 3 ) and \front\factory\ShopPaymentMethod::is_payment_active( 4 ) ):?>
global $mdb;
$przelewy24_hash = md5( time() );
$mdb -> update( 'pp_shop_orders', [ 'przelewy24_hash' => $przelewy24_hash ], [ 'id' => $this -> order['id'] ] );
?>
endif;?>
if ( ( $this -> order['payment_method_id'] == 6 or $this -> order['payment_method_id'] == 5 or $this -> order['payment_method_id'] == 1 or $this -> order['payment_method_id'] == 3 ) and \front\factory\ShopPaymentMethod::is_payment_active( 5 ) ):
$url = 'https://secure.tpay.com';
$this -> settings['tpay_sandbox'] ? $id = '1010' : $id = $this -> settings['tpay_id'];
$this -> settings['tpay_sandbox'] ? $code = 'demo' : $code = $this -> settings['tpay_security_code'];
$this -> settings['tpay_sandbox'] ? $email = 'biuro@project-pro.pl' : $email = 'sklep@marianek.pl';
$url .= '?id=' . $id;
$url .= '&kwota=' . str_replace( ',', '.', round( $this -> order['summary'], 2 ) );
$url .= '&opis=' . urlencode( 'Zamówienie nr ' . $this -> order['number'] );
$url .= '&wyn_email=' . urlencode( $email );
$url .= '&email=' . urlencode( $this -> order['client_email'] );
$url .= '&nazwisko=' . urlencode( $this -> order['client_name'] . ' ' . $this -> order['client_surname'] );
$url .= '&crc=' . $this -> order['hash'];
$url .= '&result_url=' . urlencode( $base . "://" . $_SERVER['SERVER_NAME'] . '/tpay-status' );
$url .= '&return_url=' . urlencode( $base . "://" . $_SERVER['SERVER_NAME'] . '/potwierdzenie-platnosci/' . $this -> order['hash'] );
$url .= '&return_error_url=' . urlencode( $base . "://" . $_SERVER['SERVER_NAME'] . '/zamowienie/' . $this -> order['hash'] );
$url .= '&md5sum=' . md5( $id . '&' . str_replace( ',', '.', round( $this -> order['summary'], 2 ) ) . '&' . $this -> order['hash'] . '&' . $code );
?>
endif;?>