-
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
DLocal: Add save field on card object #4785
DLocal: Add save field on card object #4785
Conversation
response = @gateway.purchase(@amount, @credit_card, @options.merge(save: true)) | ||
assert_success response | ||
assert_equal true, response.params['card']['save'] | ||
assert_not_empty response.params['card']['card_id'] |
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.
Can you also assert that we're receiving the [card][type]
in the response, since that's one of the motivations for adding this?
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.
Hey @jcreiff after a little more digging, I see that the card['type'] is not returned in the sandbox tests response even when calling verify instead of purchase. This may be a limitation of the gateway sandbox but if there's something I'm missing, please let me know, thanks!
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.
hey @jcreiff the sandbox is now returning the card type so i added the assertion to the remote test, thanks!
a974489
to
efa3694
Compare
efa3694
to
51ec4f4
Compare
51ec4f4
to
ae4b945
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.
🚀 Nice work!
ae4b945
to
5a4ae34
Compare
Add the save field to card object, documentation found here
Local:
5512 tests, 77364 assertions, 0 failures, 19 errors, 0 pendings, 0 omissions, 0 notifications
99.6553% passed
Unit:
44 tests, 191 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
Remote:
39 tests, 105 assertions, 2 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
94.8718% passed