-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VisaNet Peru: Always include DSC_COD_ACCION
Always include the action code description (DSC_COD_ACCION), when available. This also adds a test[1] to ensure the logic[2] is correct for our stashing the message in the options hash for retrying a full refund if a partial refund fails. [1] #3174 (comment) [2] #2772 (comment) ECS-173 Unit: 15 tests, 75 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed Remote: 18 tests, 27 assertions, 16 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 11.1111% passed (Please note that most of the remote tests are failing because our test credentials are invalid and we've not been able to get new/valid credentials as of the time of this commit). Closes #3174
- Loading branch information
Zeb DeOs
committed
Apr 1, 2019
1 parent
077cba4
commit b16d656
Showing
4 changed files
with
103 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,17 +73,21 @@ def test_successful_authorize_fractional_amount | |
assert_equal '1.99', response.params['data']['IMP_AUTORIZADO'] | ||
end | ||
|
||
def test_failed_authorize | ||
def test_failed_authorize_declined_card | ||
response = @gateway.authorize(@amount, @declined_card, @options) | ||
assert_failure response | ||
assert_equal 400, response.error_code | ||
assert_equal 'Operacion Denegada.', response.message | ||
end | ||
|
||
def test_failed_authorize_bad_email | ||
@options[:email] = '[email protected]' | ||
response = @gateway.authorize(@amount, @credit_card, @options) | ||
assert_failure response | ||
assert_equal 400, response.error_code | ||
assert_equal 'REJECT', response.message | ||
|
||
# this also exercises message joining for errorMessage and DSC_COD_ACCION when both are present | ||
assert_equal 'REJECT | Operacion denegada', response.message | ||
end | ||
|
||
def test_failed_capture | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters