No ambigous test

This commit is contained in:
Laurent Destailleur 2023-04-20 12:21:55 +02:00
parent 863a9eb440
commit 6dea0425cf

View File

@ -121,7 +121,7 @@ if (preg_match('/PM=([^\.]+)/', $FULLTAG, $reg)) {
$paymentmethod = $reg[1];
}
if (empty($paymentmethod)) {
dol_print_error(null, 'The back url does not contains a parameter fulltag that should help us to find the payment method used');
dol_print_error(null, 'The callback url does not contains a parameter fulltag that should help us to find the payment method used');
exit;
}
@ -250,7 +250,7 @@ print '<br><br><br>';
if (isModEnabled('paypal')) {
if ($paymentmethod == 'paypal') { // We call this page only if payment is ok on payment system
if ($paymentmethod === 'paypal') { // We call this page only if payment is ok on payment system
if ($PAYPALTOKEN) {
// Get on url call
$onlinetoken = $PAYPALTOKEN;
@ -330,14 +330,14 @@ if (isModEnabled('paypal')) {
}
if (isModEnabled('paybox')) {
if ($paymentmethod == 'paybox') {
if ($paymentmethod === 'paybox') {
// TODO Add a check to validate that payment is ok.
$ispaymentok = true; // We call this page only if payment is ok on payment system
}
}
if (isModEnabled('stripe')) {
if ($paymentmethod == 'stripe') {
if ($paymentmethod === 'stripe') {
// TODO Add a check to validate that payment is ok. We can request Stripe with payment_intent and payment_intent_client_secret
$ispaymentok = true; // We call this page only if payment is ok on payment system
}