-
Notifications
You must be signed in to change notification settings - Fork 20
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
Shipping validation checks not working with rest_proxy.php #43
Comments
Hey jonstavis, The validation routine has some checks within it to disable validation of the shipping field due to certain conditions, such as the cart not needing shipping, etc. The urls you provide above are very useful. Could you also post your cart json and the server response json? Be sure to remove any sensitive information. If we could see the json payload and response, we could construct a test harness and give you specific insight as to why you're getting these responses. Thanks, |
Thanks for your response. Here you go. Response: HTTP/1.1 100 Continue HTTP/1.1 200 OK ["Please specify your billing first name.","Please specify your billing last name.","Please specify your billing address.","Please specify your billing city.","Please specify your billing state.","Please specify your billing zip code.","Please specify your billing country.","Please specify your email."] Post data: {"total":0 |
Hey, the next question I have is this item you're testing with. test123. Does it have shipping dimensions and a weight associated with it? Do this: go to the items page, find your test item, and click on the "Links" link. Find the item buy link and open it in a new window. Walk through the standard checkout and place a test order. See if it requires shipping there and what validation messages it gives you along the way. I'm wondering if the item you're testing with triggers the "needs shipping" flag. If it doesn't, then no validation will be done. |
That was the problem. I added shipping to the item and shipping fields are now validating. The checks that I pass into the URL are still not working, but I'm satisfied with the default billing/shipping validations that now seem to be taking place. Closing this issue. Thank you very much! |
Hey, if you're still having problems, either keep this issue open or open a new one. We're here to help! |
Thanks. I am curious why my ?check=X&check=Y&check=Z isn't working but it's not a showstopper because as I said the default validations are just what I need! |
i am working on responsive checkout and at last on validation get again and again error "please specify your credit card number". but i have already put the card number. please help me on this |
Hi,
I'm following the validation example from https://secure.ultracart.com/merchant/integrationcenter/checkoutapi_v3/demo1.html#demo07
The only difference is that I'm using the rest_proxy script on my server. I am attempting to validate the following checks:
[ 'Billing Validate City State Zip', 'Billing Phone Numbers Provided', 'Billing State Abbreviation Valid', 'Billing Address Provided', 'Email provided if required', 'Item Quantity Valid', 'Shipping Address Provided', 'Shipping State Abbreviation Valid', 'Shipping Validate City State Zip' ]
No matter what checks I specify in the url (including no checks), the only errors returned from validation are:
[
"Please specify your billing first name.",
"Please specify your billing last name.",
"Please specify your billing address.",
"Please specify your billing city.",
"Please specify your billing state.",
"Please specify your billing zip code.",
"Please specify your billing country.",
"Please specify your email."
]
(No shipping info is ever validated, even if all of the billing validations pass.)
The same thing happens if I skip validation and let validation be handled by /rest/cart/checkout. I have verified that shipping info is saved on successful orders.
Here is the actual url that the ajax call from my checkout page is using:
http://myserver.local/rest_proxy.php?_url=/rest/cart/validate&check=Billing%20Validate%20City%20State%20Zip&check=Billing%20Phone%20Numbers%20Provided&check=Billing%20State%20Abbreviation%20Valid&check=Billing%20Address%20Provided&check=Email%20provided%20if%20required&check=Item%20Quantity%20Valid&check=Shipping%20Addres%20Provided&check=Shipping%20State%20Abbreviation%20Valid&check=Shipping%20Validate%20City%20State%20Zip
Adding some logging to the rest_proxy.php script I see that the url it is hitting is:
https://secure.ultracart.com/rest/cart/validate?_url=/rest/cart/validate&check=Billing%20Validate%20City%20State%20Zip&check=Billing%20Phone%20Numbers%20Provided&check=Billing%20State%20Abbreviation%20Valid&check=Billing%20Address%20Provided&check=Email%20provided%20if%20required&check=Item%20Quantity%20Valid&check=Shipping%20Addres%20Provided&check=Shipping%20State%20Abbreviation%20Valid&check=Shipping%20Validate%20City%20State%20Zip
And I see that the POST data contains all of the shipping fields.
Other requests, such as /rest/cart, and /rest/site/items are working fine.
Am I doing something wrong? Is there some option in the merchant portal that I need to turn on to allow validation or to validate shipping fields?
Thanks very much.
The text was updated successfully, but these errors were encountered: