-
Notifications
You must be signed in to change notification settings - Fork 8
Payment requests to Paypal fail due to empty parameters #411
Comments
@lsc-dotsource Thanks for the PR. Since we don't have Integration tests I am not confident to merge this PR. We are currently trying to reproduce this case and test it for the Paypal wallet payment type and also to make sure these changes doesn't affect other payment types. |
@praveenkumarct could you perhaps push a beta version with this fix to a docker repository? |
@lsc-dotsource I could reproduce this issue locally and tried to fix it with your PR changes(by not setting empty values). Still I have the same issue.
The root cause for this problem seems to be the missing shipping address data which are required by paypal. |
We now have new communication from PayPal Support which confirms your findings: |
@lsc-dotsource Thanks for the update. Now it looks clear. |
@lsc-dotsource We are now adding a new parameter 'NoShipping' with value 1 to the paypal payment request to payone. |
We noticed, and confirmed with payone, that requests for Paypal wallet payment fail when empty parameters are passed.
This results in the following error from Payone:
{“errormessage”:“Parameter {shipping_addressaddition} faulty or missing”,“customermessage”:“Ungültiger Liefer-Adresszusatz. Bitte überprüfen Sie die Angaben.“,”errorcode”:“1371”,“status”:“ERROR”}
the relevant request is this:
{request=authorization, country=, firstname=, city=, mid=45458, successurl=https://example.com/success?token=5E1ghZ84VREA&signature=AeTlqOq%2BOuWwOiGHwiBJ008a1PzGOkrQP%2B4cSeQJEew%3D, language=, integrator_name=commercetools-payone-integration, clearingtype=wlt, mode=test, reference=D00001017, errorurl=https://example.com/error, solution_name=commercetools-platform, street=, wallettype=PPE, currency=EUR, key=, email=, zip=, shipping_street=, amount=1999, shipping_company=, backurl=https://example.com/cancel, integrator_version=v2.19.0, encoding=UTF-8, api_version=3.9, lastname=, portalid=2036918, aid=45492, shipping_country=, solution_version=1}
I believe the parameters are parsed in the MappingUtil class and assume the problem can be solved by not setting empty strings as values;
but am not certain if that would impact payment methods other than Paypal.
After talking to payone we have been told that passing empty arguments can result in unpredictable complicatons (quote in german, translation follows):
Approximate translation:
The text was updated successfully, but these errors were encountered: