Skip to content

Commit

Permalink
Merge pull request #26911 from HLFH/fix-sumup-payment-switch-link
Browse files Browse the repository at this point in the history
Fix TakePOS SumUp connector
  • Loading branch information
eldy authored Dec 1, 2023
2 parents 53c8a3a + e274782 commit 5329fae
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion htdocs/takepos/pay.php
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,13 @@ function ValidateSumup() {
if (amountpayed > <?php echo $invoice->total_ttc; ?>) {
amountpayed = <?php echo $invoice->total_ttc; ?>;
}
if (amountpayed == 0) {
amountpayed = <?php echo $invoice->total_ttc; ?>;
}
var currencycode = "<?php echo $invoice->multicurrency_code; ?>";

// Starting sumup app
window.open('sumupmerchant://pay/1.0?affiliate-key=<?php echo urlencode(getDolGlobalString('TAKEPOS_SUMUP_AFFILIATE')) ?>&app-id=<?php echo urlencode(getDolGlobalString('TAKEPOS_SUMUP_APPID')) ?>&total=' + amountpayed + '&currency=EUR&title=' + invoiceid + '&callback=<?php echo DOL_MAIN_URL_ROOT ?>/takepos/smpcb.php');
window.open('sumupmerchant://pay/1.0?affiliate-key=<?php echo urlencode(getDolGlobalString('TAKEPOS_SUMUP_AFFILIATE')) ?>&app-id=<?php echo urlencode(getDolGlobalString('TAKEPOS_SUMUP_APPID')) ?>&amount=' + amountpayed + '&currency=' + currencycode + '&title=' + invoiceid + '&callback=<?php echo DOL_MAIN_URL_ROOT ?>/takepos/smpcb.php');

var loop = window.setInterval(function () {
$.ajax({
Expand Down

0 comments on commit 5329fae

Please sign in to comment.