Comments (2)
The latest version of balanced.js does not validate the card until you perform an authenticated operation on the card.
e.g.
Tokenize a card that will fail (no auth token, same as balanced.js)
curl https://api.balancedpayments.com/cards \
-H "Accept: application/vnd.api+json;revision=1.1" \
-d "expiration_month=12" \
-d "cvv=123" \
-d "number= 4444444444444448" \
-d "expiration_year=2020"
{
"cards": [
{
"href": "/cards/CC1v3ZZXIHaBB3ucLEkCjfoK",
"id": "CC1v3ZZXIHaBB3ucLEkCjfoK",
"links": {}
}
],
"links": {}
}
Now debit the card
curl https://api.balancedpayments.com/cards/CC1v3ZZXIHaBB3ucLEkCjfoK/debits \
-H "Accept: application/vnd.api+json;revision=1.1" \
-u ak-test-2qEM0Znvd8LIVbZ01LbFHvHgab4fkNr3c: \
-d amount=100
{
"errors": [
{
"status": "Payment Required",
"category_code": "card-declined",
"additional": "Account Frozen",
"status_code": 402,
"category_type": "banking",
"extras": {},
"request_id": "OHM6a971db0c58a11e3961006429171ffad",
"description": "R758: Account Frozen. Your request id is OHM6a971db0c58a11e3961006429171ffad."
}
],
"links": {
"debits.customer": "/customers/{debits.customer}",
"debits.dispute": "/disputes/{debits.dispute}",
"debits.source": "/resources/{debits.source}",
"debits.order": "/orders/{debits.order}",
"debits.refunds": "/debits/{debits.id}/refunds",
"debits.events": "/debits/{debits.id}/events"
},
"debits": [
{
"status": "failed",
"description": null,
"links": {
"customer": null,
"source": "CC1v3ZZXIHaBB3ucLEkCjfoK",
"order": null,
"dispute": null
},
"updated_at": "2014-04-16T17:13:14.243895Z",
"created_at": "2014-04-16T17:13:13.781225Z",
"transaction_number": "W271-400-9485",
"failure_reason": "R758: Account Frozen.",
"currency": "USD",
"amount": 100,
"failure_reason_code": "card-declined",
"meta": {},
"href": "/debits/WD2OFg8qYh9WnSm95IDJy2od",
"appears_on_statement_as": "BAL*example.com",
"id": "WD2OFg8qYh9WnSm95IDJy2od"
}
]
}
I do not believe we have correctly documented this change in behavior, thanks for bringing it to our attention, we'll create an issue and get this resolved.
from balanced-js.
Very detailed, thank you.
from balanced-js.
Related Issues (20)
- Better validation of input HOT 2
- Library should be built unminified and beautified. HOT 1
- Remove requirement to match card type before allowing it to be submitted. HOT 2
- Rename isSecurityCodeValid in 1.1 HOT 4
- Rename validateRoutingNumber in 1.1 HOT 1
- account_type Field 1.1
- Type Parameter is incorrect for tokenizing and creating bank accounts
- the goot HOT 1
- Coinbase example should display the tokenized result
- Make balanced.js installable with bower HOT 4
- Allow coinbase `send` scope to be complemented with `send_limit_amount`
- Put balanced.js in bower / component HOT 4
- Fails to tokenize when '#' is passed into the address line field HOT 4
- balanced.js is broken HOT 6
- Link in README is broken
- Balanced JS lib on Parse.com platform HOT 2
- Balanced js breaks in IE8 HOT 3
- Balanced server should be sending the "Vary: Accept-Encoding" header. HOT 1
- Add license header to the actual .js so it will be recognized as free software by LibreJS HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from balanced-js.