Skip to content
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

[WorldPay] Use multiple address fields #270

Merged
merged 1 commit into from
Jan 8, 2018
Merged

Conversation

joshnuss
Copy link
Contributor

@joshnuss joshnuss commented Jan 3, 2018

The current mapping for WorldPay concatenates address1, address2, city & state into one field "address".

That caused address to be displayed weirdly on WorldPay's end.

WorldPay does support sending address fields separately. WorldPay Specification

This PR removes the need to concatenate address data.

@joshnuss joshnuss requested a review from pi3r January 3, 2018 18:23
:city => 'town',
:state => 'region',
:zip => 'postcode',
:country => 'country'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before it was doing lookup_country_code(params[:country]). I can't remember what we set to country but we have to ensure it's the ISO country code and not the country name.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checked, we should be sending the country_code alright!

Copy link
Contributor

@bdewater bdewater Jan 8, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The add_address helper takes care of this so it's all good 👍

@joshnuss joshnuss requested a review from bdewater January 8, 2018 16:44
@bdewater bdewater merged commit 78ffb39 into master Jan 8, 2018
@bdewater bdewater deleted the worldpay/remove-concat branch January 8, 2018 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants