This repository was archived by the owner on May 31, 2024. It is now read-only.
Add currency to body of _createCreditCardToken#18
Open
ambareng wants to merge 2 commits intoxendit:masterfrom
Open
Add currency to body of _createCreditCardToken#18ambareng wants to merge 2 commits intoxendit:masterfrom
ambareng wants to merge 2 commits intoxendit:masterfrom
Conversation
reynaldipane
suggested changes
Apr 27, 2022
There was a problem hiding this comment.
hi @ambareng , thanks for raising this PR!
I think we can have better validation to add currency in this _createCreditCardToken method
instead of adding the field directly in the body, I think we need to validate it first, and if its okay that we can add the field to the body. Like this:
if(tokenData.currency !== undefined && tokenData.currency !== '') {
body.currency = tokenData.currency;
}
boazcstrike
approved these changes
Apr 27, 2022
boazcstrike
left a comment
There was a problem hiding this comment.
Looks better than the initial proposed change. Works on our local.
Author
|
Hi @reynaldipane. Sorry if this is super late but I already updated my code according to your comments. Thanks! |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In
_createCreditCardTokenI added thecurencyproperty as it was missing. Without it the tokenization process does not know which currency you are using.I need to specify currency as 'PHP' as if it is 'IDR' which is the default, amount needs to be an integer instead of possibly a decimal for Philippine currency.
Thanks and feel free to ask me any questions or concerns you may have.