The purpose of this plugin is to leverage Hybrid Applications with card.io features. With this plugin, users can scan credit cards in a hybrid mobile app.
As with all the cordova plugins, the plugin isn't available until the execution of deviceready
event.
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
// ...
}
- iOS
- Android
- Run the following command:
cordova plugin add https://github.com/OutSystems/CardIO-Cordova-Plugin
function scanCard(successCallback, errorCallback, requireExpiry, requireCvv, requirePostalCode)
successCallback
A callback function invoked with an argument:scanResult
:{ "cardType":"", "expiryMonth":9, "expiryYear":2016, "postalCode":"1234-123", "cvv":"123", "redactedCardNumber":"••••••••••••1234", "rawCardNumber":"1234123412341234" }
errorCallback
A callback function invoked with an argument:error
:{ "error_code":0, "error_message": ""; }
requireExpiry
bool Require expiration date to be entered?requireCvv
bool Require CVV code to be entered?requirePostalCode
bool Require Postal Code (zip code) to be entered?
plugin.cardio.scanCard(
function(scanResult){
console.log(scanResult)
},
function(error){
console.log(error)
}, true, true, true);
- OutSystems - Mobility Experts
- João Gonçalves, [email protected]
- Rúben Gonçalves, [email protected]
- Vitor Oliveira, [email protected]
- João Gonçalves, [email protected]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.