Skip to content

Commit

Permalink
v1.8-1.0.9 CardholderName
Browse files Browse the repository at this point in the history
  • Loading branch information
PavelStrejcek committed Jun 25, 2024
1 parent e4f2588 commit bbf6b80
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Further information (in Czech) is in the Instructions for Use:
[doc/Navod_k_pouziti_modulu_Pays_v1.4-PS8.pdf](doc/Navod_k_pouziti_modulu_Pays_v1.4-PS8.pdf)

Author: Pavel Strejček <aplikace@brainweb.cz>
Copyright: 2019 - 2023 Pavel Strejček
Copyright: 2019 - 2024 Pavel Strejček
License: Licensed under the Open Software License version 3.0 https://opensource.org/licenses/OSL-3.0

Payment gateway operator and support: www.Pays.cz
Expand Down
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2024/06/25 (version 1.0.9)
- General: CardholderName added to the payment request, the email always

2023/04/21 (version 1.0.8)
- General: changes for PS 8
- General: copy payment url function
Expand Down
14 changes: 6 additions & 8 deletions pays_ps.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function __construct()
{
$this->name = 'pays_ps';
$this->tab = 'payments_gateways';
$this->version = '1.0.8';
$this->version = '1.0.9';
$this->author = 'Pavel Strejček @ BrainWeb.cz';
$this->need_instance = 0;
$this->ps_versions_compliancy = array('min' => '8.0', 'max' => '8.9');
Expand Down Expand Up @@ -451,7 +451,7 @@ public function hookDisplayAdminOrder($params)
));
}
if ($this->isOrderForPayment($order, false)) {
$paymentUrl = $this->createPaymentUrl($order, false);
$paymentUrl = $this->createPaymentUrl($order);
$this->context->smarty->assign(array(
'paysPsPaymentUrl' => $paymentUrl
));
Expand Down Expand Up @@ -732,7 +732,7 @@ public function checkOptionHash($option, $id_cart, $hash)
return false;
}

public function createPaymentUrl($order, $email = true)
public function createPaymentUrl($order)
{
$customer = new Customer($order->id_customer);
$currency = new Currency($order->id_currency);
Expand All @@ -757,13 +757,11 @@ public function createPaymentUrl($order, $email = true)
'Shop' => Configuration::get('PAYS_PS_SHOP'),
'Currency' => $isoCode,
'Amount' => number_format($amount * 100, 0, '.', ''),
'MerchantOrderNumber' => $order->reference
'MerchantOrderNumber' => $order->reference,
'CardholderName' => $customer->firstname . ' ' . $customer->lastname,
'Email' => $customer->email,
);

if ($email) {
$params['Email'] = $customer->email;
}

if (array_key_exists(strtolower($language->iso_code), $this->paysPsAllowedLanguages)) {
$params['Lang'] = $this->paysPsAllowedLanguages[$language->iso_code];
}
Expand Down

0 comments on commit bbf6b80

Please sign in to comment.