-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Nuvei: Add ACH support #5269
Nuvei: Add ACH support #5269
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nince and clean @javierpedrozaing
@@ -315,7 +338,7 @@ def parse(body) | |||
end | |||
|
|||
def success_from(response) | |||
response[:status] == 'SUCCESS' && response[:transactionStatus] == 'APPROVED' | |||
response[:status] == 'SUCCESS' && (response[:transactionStatus] == 'APPROVED' || response[:transactionStatus] == 'PENDING') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ Question:
I'm seeing a notification_url
field + a 'pending' status on the transaction, does that mean that ACH payments on this gateway are async?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Heavyblade yes this ensures that we receive transaction results that may not always be immediately available cause in the status response we can get PENDING to UPDATE to APPROVED.
|
||
def test_successful_authorize_with_bank_account | ||
@options.update(billing_address: address.merge(country: 'US', state: 'MA')) | ||
response = @gateway.authorize(1.25, @bank_account, @options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ Question:
Just out of curiosity => you are doing a transaction for 1.25 cents, no dollars, and it works?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, the 1.25
is a Nuvei test value for Successful deposit
@@ -149,6 +151,19 @@ def test_successful_stored_credentials_merchant_recurring | |||
end.respond_with(successful_purchase_response) | |||
end | |||
|
|||
def test_successful_authorize_bank_account |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💬 Comment:
It's not a big issue, bu what's the purpose of setting and instance variable @bank_account in the before block if it will just be used once?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's because the bank account can be used with payouts, so we will eventually add more tests for the bank account
97051e7
to
3c22922
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
gsub(%r(("merchantKey\\?":\\?")\d+), '\1[FILTERED]') | ||
gsub(%r(("merchantKey\\?":\\?")\d+), '\1[FILTERED]'). | ||
gsub(%r(("accountNumber\\?":\\?")\d+), '\1[FILTERED]'). | ||
gsub(%r(("routingNumber\\?":\\?")\d+), '\1[FILTERED]') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove routingNumber
from the scrub. This isn't a sensitive value we need to protect.
3c22922
to
1cf2c79
Compare
Description ------------------------- [SER-1403](https://spreedly.atlassian.net/browse/SER-1403) This commit add ACH transaction for Nuvei Unit test ------------------------- Finished in 0.010487 seconds 10 tests, 34 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed 53.56 tests/s, 3242.11 assertions/s Remote test ------------------------- Finished in 36.783565 seconds. 18 tests, 48 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed 0.49 tests/s, 1.30 assertions/s Rubocop ------------------------- 801 files inspected, no offenses detected
1cf2c79
to
49868b3
Compare
9bc376b
to
0e8869e
Compare
Description
SER-1403
This commit add ACH transaction for Nuvei
Unit test
Finished in 0.010487 seconds
10 tests, 34 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed
53.56 tests/s, 3242.11 assertions/s
Remote test
Finished in 36.783565 seconds.
18 tests, 48 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed
0.49 tests/s, 1.30 assertions/s
Rubocop
801 files inspected, no offenses detected