Skip to content

Commit

Permalink
Fix phone number format problem
Browse files Browse the repository at this point in the history
  • Loading branch information
Franck Allimant committed May 31, 2021
1 parent f6fa8da commit 0cb7151
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion CmCIC.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,16 +286,21 @@ public static function orderAddressForCbPayment(OrderAddress $orderAddress) {
$address["stateOrProvince"] = $orderAddress->getState()->getIsocode();
}

/*
We should not pass a phone number. This number is optionnal, but if it is provided, it should match the
documented regexp : (^[0-9]{2,20}$), which is not always the case, an may prevent payment !!
if (substr($orderAddress->getPhone(),0,1) == "+") {
$address["phone"] = $orderAddress->getPhone();
}
if (substr($orderAddress->getCellphone(),0,1) == "+") {
$address["mobilePhone"] = $orderAddress->getCellphone();
}
*/

return $address;
}
}

/**
* Get the new format for seal content, for DSP-2 (cf https://www.monetico-paiement.fr/fr/info/documentations/Monetico_Paiement_documentation_migration_3DSv2_1.0.pdf#%5B%7B%22num%22%3A83%2C%22gen%22%3A0%7D%2C%7B%22name%22%3A%22XYZ%22%7D%2C68%2C716%2C0%5D )
Expand Down
2 changes: 1 addition & 1 deletion Config/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<language>fr_FR</language>
<language>en_US</language>
</languages>
<version>1.4.3</version>
<version>1.4.4</version>
<authors>
<author>
<name>Thelia</name>
Expand Down

0 comments on commit 0cb7151

Please sign in to comment.