-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Phone number format issues with Klarna #972
Comments
Sorry, it's not just an issue with the number format; it goes much deeper. This is going to be a long comment, so please pay attention. The method try {
$apiPayment = $this->createPayment($data, $paymentMethodObj->method);
} catch (Exception $e) {
...
} then this error may be omitted in some cases. The entire code looks like this: try {
$apiPayment = $this->createPayment($data, $paymentMethodObj->method);
} catch (Exception $e) {
if ($data instanceof OrderData) {
$data->setDeliveryPhoneNumber(null);
$data->setBillingPhoneNumber(null);
}
try {
$apiPayment = $this->createPayment($data, $paymentMethodObj->method);
} catch (OrderCreationException $e) {
$errorHandler = ErrorHandler::getInstance();
$errorHandler->handle($e, HttpStatusCode::HTTP_BAD_REQUEST, true);
} catch (Exception $e) {
$errorHandler = ErrorHandler::getInstance();
$errorHandler->handle($e, HttpStatusCode::HTTP_INTERNAL_SERVER_ERROR, true);
}
} For example, if you use the Klarna Pay Now method, this part of code: if ($data instanceof OrderData) {
$data->setDeliveryPhoneNumber(null);
$data->setBillingPhoneNumber(null);
} This will remove the delivery and billing phone numbers, and In my example, this logic hid the error: Maybe this should be a separate issue, but I'll leave it here for now while I continue debugging. |
Hi there @mariuszsienkiewicz, thank you for the detailed comment. We will check this issue and I will get back to you as soon as more details. Thank you for your patience! -- |
Hey @justelis22! One more thing – just to help you out with testing - try entering just one letter (e.g., I really appreciate your effort. |
Hi there @mariuszsienkiewicz, thanks for waiting! We came back to this request, here are a few comments:
As for the last issue, we have checked this issue and tried to recreate it locally on our environments, however, everything seems to be working fine, but we were not able to prompt this issue. That being said, we will need access to your shop to debug the issue. Can you provide the Back Office and FTP credentials? Also steps to recreate the issue would be also very useful. You can add the credentials here - https://privatebin.net/ and share the link with us via email [email protected] Thanks! Best Regards, |
Hey, I see that you closed this issue – that's fine. Thank you for the detailed response. I’d like to address a few points on your list:
Thanks! 🙂 |
Hi there @mariuszsienkiewicz, We have discussed this internally, and we will approach the phone format issue from a different aspect. We can't change how Klarna accepts the phone number. However, we can add steps to ensure the phone is sent to Klarna correctly. Our team is currently refining this, but you can expect changes in the 6.2.5 Mollie version. If you have any questions, please let me know! I will keep this open for now. Best Regards, |
Hello there @mariuszsienkiewicz, We have created a beta release with the improvement to handle Klarna's phone number. If possible, please try to install the beta version as the feedback would be helpful to us. If you have any questions, please let me know! Best Regards, |
The issue is with Dutch phone numbers.
In the Netherlands, as far as I know, the numbers
0689124321
and+31689124321
are the same and valid.Unfortunately, both are not transferred correctly to Klarna (I have tested it by using the Pay Now payment method) by the Mollie module, resulting in this error message being shown in the cart: It looks like you have entered an incorrect phone number format in the billing address step. Please change the number and try again.
0689124321
from the billing address is transformed (by PhoneNumberProvider::getFromAddress) to+689124321
, which is, of course, not valid.+31689124321
is left the same and Klarna still doesn't allow it.We are using the current version of the module and PrestaShop 8.1.7.
The text was updated successfully, but these errors were encountered: