Skip to content

Commit

Permalink
Merge pull request #18 from wirecard/TPWDCEE-792
Browse files Browse the repository at this point in the history
#17 prevent possible issues with financial institution EPS/IDEAL
  • Loading branch information
jpy authored Feb 12, 2018
2 parents 1998e10 + 229a689 commit c134176
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
17 changes: 12 additions & 5 deletions wirecardceecheckout.php
Original file line number Diff line number Diff line change
Expand Up @@ -960,13 +960,20 @@ protected function _initiatePayment($cart)
$client->setShippingProfile('NO_SHIPPING');
}

if ( in_array($paymentType, array(WirecardCEE_QPay_PaymentType::IDL, WirecardCEE_QPay_PaymentType::EPS ) ) ) {
if (isset($_POST['financialInstitution'])) {
$client->setFinancialInstitution($_POST['financialInstitution']);
if ($paymentType == WirecardCEE_QPay_PaymentType::IDL) {
if (isset($_POST['financialInstitution_idl'])) {
$client->setFinancialInstitution($_POST['financialInstitution_idl']);
} else {
$client->setFinancialInstitution($sessionWirecard->additional["financialInstitution"]);
$client->setFinancialInstitution($sessionWirecard->additional["financialInstitution_idl"]);
}
}
} else if ($paymentType == WirecardCEE_QPay_PaymentType::EPS) {
if (isset($_POST['financialInstitution_eps'])) {
$client->setFinancialInstitution($_POST['financialInstitution_eps']);
} else {
$client->setFinancialInstitution($sessionWirecard->additional["financialInstitution_eps"]);
}
}

if (array_key_exists('ST', $order['details'])) {
$client->createConsumerMerchantCrmId($order['details']['ST']->email);
}
Expand Down
2 changes: 1 addition & 1 deletion wirecardceecheckout/tmpl/displaypayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
<?php if ( isset( $pt['financial_inst'] ) ) { ?>
<div style="margin-left:23px; display: <?= ($viewData['paymenttype_selected'] !== strtolower( $pt['value'] )) ? 'none' : 'block';?>;" class="additional-information">
<b><?php echo JText::_('VMPAYMENT_WIRECARDCEECHECKOUT_FINANCIAL_INST_HEADER'); ?></b><br/>
<select name="financialInstitution" id="financialInstitutions">
<select name="financialInstitution_<?= strtolower( $pt['value'] ); ?>" id="financialInstitutions_<?= strtolower( $pt['value'] ); ?>">
<?php foreach($pt['financial_inst'] as $key => $value) { ?>
<option value="<?php echo $key; ?>"><?php echo $value; ?></option>
<?php } ?>
Expand Down

0 comments on commit c134176

Please sign in to comment.