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

Fix partial or missing address exceptions #3180

Merged
merged 1 commit into from
Mar 22, 2019

Conversation

molbrown
Copy link
Contributor

NilClass errors noted in attempted transactions for DLocal and Mundipagg gateways,
due to absent objects. Made small fixes that will avoid this error.

Mundipagg Unit tests:
17 tests, 76 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

DLocal Unit tests:
16 tests, 48 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

@molbrown molbrown requested a review from a team March 22, 2019 21:25
@molbrown molbrown force-pushed the fix_no_address_exceptions branch from 4e0bf84 to e0c6be8 Compare March 22, 2019 21:36
post[:address][:street] = address[:address1].match(/\D+/)[0].strip if address[:address1]
post[:address][:number] = address[:address1].match(/\d+/)[0] if address[:address1]
post[:address][:street] = address[:address1].match(/\D+/)[0].strip if address[:address1].match(/\D+/) && address[:address1]
post[:address][:number] = address[:address1].match(/\d+/)[0] if address[:address1].match(/\d+/) && address[:address1]
Copy link
Member

Choose a reason for hiding this comment

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

Should the check that address[:address1] is truthy occur before the match?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

@molbrown molbrown force-pushed the fix_no_address_exceptions branch from e0c6be8 to a20d4fa Compare March 22, 2019 21:40
Copy link
Member

@jknipp jknipp left a comment

Choose a reason for hiding this comment

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

👍

@molbrown molbrown force-pushed the fix_no_address_exceptions branch from a20d4fa to bfeef0c Compare March 22, 2019 21:51
NilClass errors noted in attempted transactions for DLocal and Mundipagg gateways,
due to absent objects. Made small fixes that will avoid this error.

Mundipagg Unit tests:
17 tests, 76 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

DLocal Unit tests:
16 tests, 48 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Closes activemerchant#3180
@molbrown molbrown force-pushed the fix_no_address_exceptions branch from bfeef0c to 2541ce5 Compare March 22, 2019 22:08
@molbrown molbrown merged commit 2541ce5 into activemerchant:master Mar 22, 2019
@molbrown molbrown deleted the fix_no_address_exceptions branch April 9, 2019 18:21
whitby3001 pushed a commit to whitby3001/active_merchant that referenced this pull request Sep 3, 2019
NilClass errors noted in attempted transactions for DLocal and Mundipagg gateways,
due to absent objects. Made small fixes that will avoid this error.

Mundipagg Unit tests:
17 tests, 76 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

DLocal Unit tests:
16 tests, 48 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Closes activemerchant#3180
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.

2 participants