Skip to content

Commit

Permalink
Release 1.0.19
Browse files Browse the repository at this point in the history
  • Loading branch information
edgaraswallee committed Jan 17, 2024
1 parent 09cfeff commit 080284b
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ account dashboard.

## Documentation

[Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/jtl-5/1.0.18/docs/en/documentation.html)
[Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/jtl-5/1.0.19/docs/en/documentation.html)

## License

Expand Down
14 changes: 13 additions & 1 deletion Services/PostFinanceCheckoutTransactionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use stdClass;
use PostFinanceCheckout\Sdk\ApiClient;
use PostFinanceCheckout\Sdk\Model\{AddressCreate,
Gender,
LineItemCreate,
LineItemType,
Transaction,
Expand Down Expand Up @@ -143,7 +144,6 @@ public function confirmTransaction(Transaction $transaction): void
]);

$pendingTransaction->setMerchantReference($orderNr);

$this->apiClient->getTransactionService()
->confirm($this->spaceId, $pendingTransaction);

Expand Down Expand Up @@ -533,6 +533,12 @@ private function createBillingAddress(): AddressCreate
$billingAddress->setPhoneNumber($customer->cMobil);
$billingAddress->setSalutation($customer->cTitel);

$gender = $_SESSION['orderData']?->oKunde?->cAnrede ?? null;
if ($gender !== null) {
$billingAddress->setGender($gender === 'm' ? Gender::MALE : Gender::FEMALE);
$billingAddress->setSalutation($gender === 'm' ? 'Mr' : 'Ms');
}

return $billingAddress;
}

Expand All @@ -556,6 +562,12 @@ private function createShippingAddress(): AddressCreate
$shippingAddress->setPhoneNumber($customer->cMobil);
$shippingAddress->setSalutation($customer->cTitel);

$gender = $_SESSION['orderData']?->oKunde?->cAnrede ?? null;
if ($gender !== null) {
$shippingAddress->setGender($gender === 'm' ? Gender::MALE : Gender::FEMALE);
$shippingAddress->setSalutation($gender === 'm' ? 'Mr' : 'Ms');
}

return $shippingAddress;
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/en/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h2>Documentation</h2> </div>
</a>
</li>
<li>
<a href="https://github.com/pfpayments/jtl-5/releases/tag/1.0.18/">
<a href="https://github.com/pfpayments/jtl-5/releases/tag/1.0.19/">
Source
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<Icon>logo.jpg</Icon>
<PluginID>jtl_postfinancecheckout</PluginID>
<CreateDate>2023-05-29</CreateDate>
<Version>1.0.18</Version>
<Version>1.0.19</Version>
<Install>
<Locales>
<Variable>
Expand Down
2 changes: 1 addition & 1 deletion vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInitb19b981bc254fb8ee325a2de1b4ba3e2::getLoader();
return ComposerAutoloaderInit39b485e377e8f7811713b1fbf9c612ac::getLoader();
8 changes: 4 additions & 4 deletions vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// autoload_real.php @generated by Composer

class ComposerAutoloaderInitb19b981bc254fb8ee325a2de1b4ba3e2
class ComposerAutoloaderInit39b485e377e8f7811713b1fbf9c612ac
{
private static $loader;

Expand All @@ -24,12 +24,12 @@ public static function getLoader()

require __DIR__ . '/platform_check.php';

spl_autoload_register(array('ComposerAutoloaderInitb19b981bc254fb8ee325a2de1b4ba3e2', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit39b485e377e8f7811713b1fbf9c612ac', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInitb19b981bc254fb8ee325a2de1b4ba3e2', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit39b485e377e8f7811713b1fbf9c612ac', 'loadClassLoader'));

require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitb19b981bc254fb8ee325a2de1b4ba3e2::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit39b485e377e8f7811713b1fbf9c612ac::getInitializer($loader));

$loader->register(true);

Expand Down
8 changes: 4 additions & 4 deletions vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Composer\Autoload;

class ComposerStaticInitb19b981bc254fb8ee325a2de1b4ba3e2
class ComposerStaticInit39b485e377e8f7811713b1fbf9c612ac
{
public static $prefixLengthsPsr4 = array (
'W' =>
Expand Down Expand Up @@ -35,9 +35,9 @@ class ComposerStaticInitb19b981bc254fb8ee325a2de1b4ba3e2
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitb19b981bc254fb8ee325a2de1b4ba3e2::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitb19b981bc254fb8ee325a2de1b4ba3e2::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitb19b981bc254fb8ee325a2de1b4ba3e2::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit39b485e377e8f7811713b1fbf9c612ac::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit39b485e377e8f7811713b1fbf9c612ac::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit39b485e377e8f7811713b1fbf9c612ac::$classMap;

}, null, ClassLoader::class);
}
Expand Down
4 changes: 2 additions & 2 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'name' => '__root__',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '480d57c9e991b9cb79e69c14625a681a17509333',
'reference' => 'db06ed79c3f185677bba7b74be6816d7935a67d2',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand All @@ -13,7 +13,7 @@
'__root__' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '480d57c9e991b9cb79e69c14625a681a17509333',
'reference' => 'db06ed79c3f185677bba7b74be6816d7935a67d2',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down

0 comments on commit 080284b

Please sign in to comment.