reverbdotcom / reverb-magento

Magento 1.x plugin for syncing with Reverb
Other
7 stars 10 forks source link

Reverb Orders need to have all address fields trimmed to pass Magento validation #143

Closed StevenWolfe closed 8 years ago

StevenWolfe commented 9 years ago

We received an order where the Reverb customer's name, street address, and locality had a space on the end of the field, like:

{
  "name": "John Doe ",
  "street_address": "123 Road ",
  "extended_address": "",
  "locality": "Waffle House ",
  "region": "TX",
  "postal_code": "12345",
  "country_code": "US",
  "phone": "1234567890"
}

The Magento Order failed to be created due to address validation errors. The trailing spaces were removed and the order successfully was created.

@skwp perhaps this is an API change rather than Magento?

skwp commented 9 years ago

Yep We can fix this in the Api but it's a strange reason to fail. Magento is a strange beast.

Thanks for reporting please keep it up

Sent from my iPhone

On Nov 6, 2015, at 12:50 PM, Steve Wolfe notifications@github.com wrote:

We received an order where the Reverb customer's name, street address, and locality had a space on the end of the field, like:

{ "name": "John Doe ", "street_address": "123 Road ", "extended_address": "", "locality": "Waffle House ", "region": "TX", "postal_code": "12345", "country_code": "US", "phone": "1234567890" } The Magento Order failed to be created due to address validation errors. The trailing spaces were removed and the order successfully was created.

@skwp perhaps this is an API change rather than Magento?

— Reply to this email directly or view it on GitHub.

StevenWolfe commented 9 years ago

Strange beast indeed–it never makes sense, and is never simple. Two years in and I'm ready to get back to the real world away from PHP and Magento.

Sorry for the wall of issues; just finally getting a break from a couple weeks of fires. Hoping to get some pull requests in for some of these odds and ends before long.

skwp commented 8 years ago

Filing this as an API side fix. Keeping issue open until we fix it.

dunagan5887 commented 8 years ago

I suppose we could additionally put in code to run trim() on any/all fields returned from Reverb, this may help alleviate any issues related to whitespaces

skwp commented 8 years ago

Yeah that coudl be good as a fix here, thanks