-
Notifications
You must be signed in to change notification settings - Fork 64
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
Forex #564
Forex #564
Changes from 1 commit
d94eb41
8b08372
f8eb3b3
4307c8f
f17f031
84ab490
a2f687e
3b64750
b5a3013
bfe1227
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
Feature: Forex | ||
Foreign currency exchange, hereafter 'forex', is a feature that allows | ||
marketplaces to charge thier buyers in non-USD currencies. | ||
|
||
This provides a better experience for customers who have accounts denominated | ||
in other currencies, and reduces chargeback rates for those customers as well. | ||
|
||
Scenario: Debit a card in ⬠| ||
Given I have tokenized a card | ||
When I make a POST request to the link "cards.debits" with the body: | ||
""" | ||
{ | ||
"debits": [{ | ||
"amount": 2000, | ||
"currency": "EUR" | ||
}] | ||
} | ||
""" | ||
Then I should get a 201 Created status code | ||
And the response is valid according to the "debits" schema | ||
|
||
Scenario: Debiting a card directly in ⬠| ||
When I POST to /debits with the body: | ||
""" | ||
{ | ||
"debits": [{ | ||
"amount": 1234, | ||
"source": { | ||
"number": "4111111111111111", | ||
"expiration_year": "2018", | ||
"expiration_month": 12 | ||
}, | ||
"currency": "EUR" | ||
}] | ||
} | ||
""" | ||
Then I should get a 201 Created status code | ||
And the response is valid according to the "debits" schema |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,8 @@ | |
"currency": { | ||
"type": "string", | ||
"enum": [ | ||
"USD" | ||
"USD", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you make a specific currencies file for this similar to status https://github.com/balanced/balanced-api/blob/master/fixtures/_models/status.json There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will eventually, this is changing. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok, I just realized how long and unyielding that had become |
||
"EUR" | ||
] | ||
}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, if both There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, integers of the smallest value of the currency. They'll be the same. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @kyungmin and I have come to the conclusion that since this information basically doesn't ever change, it will go in the documentation, and we'll provide some sample JavaScript to make it even easier to format correctly. Adding that information to the response just leads to sending the same information over the wire over and over again for little benefit. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @matin noted. I struggled to come up with the right word here, and I guess I was wrong. Do you have any suggestions for what the right term is? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What about this? {
"amount": 10000,
"currency": "EUR",
"amount_in": {
"USD": 13755
}
} The response can include whatever currencies are relevant for that marketplace. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The other alternative I would suggest is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. Let's go with |
||
"appears_on_statement_as": { | ||
|
@@ -122,4 +123,4 @@ | |
"meta", | ||
"links" | ||
] | ||
} | ||
} |
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.
�
is either a new crypto currency or an encoding error...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.
Dammit. Yeah, should be €. fixing...