diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php index d31715b03ca..f5950f629d7 100644 --- a/htdocs/public/payment/paymentok.php +++ b/htdocs/public/payment/paymentok.php @@ -882,7 +882,7 @@ if ($ispaymentok) { } else { $paiement->multicurrency_amounts = array($object->id => $FinalPaymentAmt); // Array with all payments dispatching - $postactionmessages[] = 'Payment was done in a different currency that currency expected of company'; + $postactionmessages[] = 'Payment was done in a currency ('.$currencyCodeType.') other than the expected currency of company ('.$conf->currency.')'; $ispostactionok = -1; $error++; // Not yet supported } @@ -1011,7 +1011,7 @@ if ($ispaymentok) { } else { $paiement->multicurrency_amounts = array($invoice->id => $FinalPaymentAmt); // Array with all payments dispatching - $postactionmessages[] = 'Payment was done in a different currency that currency expected of company'; + $postactionmessages[] = 'Payment was done in a currency ('.$currencyCodeType.') other than the expected currency of company ('.$conf->currency.')'; $ispostactionok = -1; $error++; } @@ -1278,7 +1278,7 @@ if ($ispaymentok) { } else { $paiement->multicurrency_amounts = array($object->id => $FinalPaymentAmt); // Array with all payments dispatching - $postactionmessages[] = 'Payment was done in a different currency that currency expected of company'; + $postactionmessages[] = 'Payment was done in a currency ('.$currencyCodeType.') other than the expected currency of company ('.$conf->currency.')'; $ispostactionok = -1; $error++; // Not yet supported } @@ -1508,7 +1508,7 @@ if ($ispaymentok) { } else { $paiement->multicurrency_amounts = array($object->id => $FinalPaymentAmt); // Array with all payments dispatching - $postactionmessages[] = 'Payment was done in a different currency that currency expected of company'; + $postactionmessages[] = 'Payment was done in a currency ('.$currencyCodeType.') other than the expected currency of company ('.$conf->currency.')'; $ispostactionok = -1; $error++; // Not yet supported } @@ -1719,7 +1719,7 @@ if ($ispaymentok) { } else { $paiement->multicurrency_amounts = array($invoice->id => $FinalPaymentAmt); // Array with all payments dispatching - $postactionmessages[] = 'Payment was done in a different currency that currency expected of company'; + $postactionmessages[] = 'Payment was done in a currency ('.$currencyCodeType.') other than the expected currency of company ('.$conf->currency.')'; $ispostactionok = -1; $error++; } diff --git a/htdocs/public/stripe/ipn.php b/htdocs/public/stripe/ipn.php index 3888b247006..1cbedcc9342 100644 --- a/htdocs/public/stripe/ipn.php +++ b/htdocs/public/stripe/ipn.php @@ -404,6 +404,8 @@ if ($event->type == 'payout.created') { $payment_amount = $payment_amountInDolibarr; // TODO Check payment_amount in Stripe (received) is same than the one in Dolibarr + $postactionmessages = array(); + if ($paymentTypeId == "CB" && ($paymentTypeIdInDolibarr == 'card' || empty($paymentTypeIdInDolibarr))) { // Case payment type in Stripe and into prelevement_demande are both CARD. // For this case, payment should already have been recorded so we just update flag of payment request if not yet 1 @@ -422,7 +424,7 @@ if ($event->type == 'payout.created') { } else { $paiement->multicurrency_amounts = [$invoice_id => $payment_amount]; // Array with all payments dispatching - $postactionmessages[] = 'Payment was done in a different currency than currency expected of company'; + $postactionmessages[] = 'Payment was done in a currency ('.$currencyCodeType.') other than the expected currency of company ('.$conf->currency.')'; $ispostactionok = -1; // Not yet supported, so error $error++;