Paypal - my zip code is not correct
Recently I had to enter an alternative address for my PayPal account.
I was stuck while attempting to insert the zip code because my five digits zip code was not validated by the PayPal interface.
Usually javascript takes care of such kind of validation.
So I was able to dig into the code searching for a way to override it :)
This is a screenshot of what the PayPal add address form looks like when you try to insert a valid zip code
The Solution:
- compile the form with your data
- open your browser developer tools by pressing F12 key.
- go to the Console tab
- enter this code
jQuery('form[name="addAddress"]').submit();
and press enter
If you’re trying to modify an address you have to change addAddress
with editAddress
.
What this means? we’re using an online payment method where
- developers don’t test all the features they implement before go live
- developers don’t validate user input serverside everywhere
pattern="/^(I-|IT-)?\d{5}$/i" maxlength="7"
“IT-” and 5 digits means the string length is 8, not 7 :)
This doesn’t seems to be a really huge security bug, but a standard user will not be able to add or modify an address… so please PayPal fix this :)