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

DLocal: Add save field on card object #4785

Conversation

yunnydang
Copy link
Contributor

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

@yunnydang yunnydang requested a review from a team May 25, 2023 18:59
@yunnydang yunnydang self-assigned this May 25, 2023
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']
Copy link
Contributor

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?

Copy link
Contributor Author

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!

Copy link
Contributor Author

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!

@yunnydang yunnydang force-pushed the d_local_add_gateway_specific_field_save branch from a974489 to efa3694 Compare May 25, 2023 22:11
@yunnydang yunnydang changed the title DLocal: Add gateway specific field save on card DLocal: Add save field on card on card object May 25, 2023
@yunnydang yunnydang force-pushed the d_local_add_gateway_specific_field_save branch from efa3694 to 51ec4f4 Compare May 25, 2023 22:13
@yunnydang yunnydang changed the title DLocal: Add save field on card on card object DLocal: Add save field on card object May 25, 2023
@yunnydang yunnydang force-pushed the d_local_add_gateway_specific_field_save branch from 51ec4f4 to ae4b945 Compare June 7, 2023 22:05
@yunnydang yunnydang requested a review from jcreiff June 7, 2023 22:06
Copy link
Contributor

@jcreiff jcreiff left a comment

Choose a reason for hiding this comment

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

🚀 Nice work!

@yunnydang yunnydang force-pushed the d_local_add_gateway_specific_field_save branch from ae4b945 to 5a4ae34 Compare June 8, 2023 16:52
@yunnydang yunnydang closed this Jun 8, 2023
@yunnydang yunnydang deleted the d_local_add_gateway_specific_field_save branch June 8, 2023 17:56
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.

None yet

2 participants