https://github.com/cloudipsp/ipsp-js-sdk
Fondy Checkout SDK
https://github.com/cloudipsp/ipsp-js-sdk
checkout-page checkout-widget payment-module
Last synced: about 2 months ago
JSON representation
Fondy Checkout SDK
- Host: GitHub
- URL: https://github.com/cloudipsp/ipsp-js-sdk
- Owner: cloudipsp
- License: mit
- Created: 2017-09-22T11:57:56.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-03-20T10:43:24.000Z (3 months ago)
- Last Synced: 2025-03-20T11:01:30.387Z (3 months ago)
- Topics: checkout-page, checkout-widget, payment-module
- Language: JavaScript
- Homepage: https://cloudipsp.github.io/ipsp-js-sdk/
- Size: 1.78 MB
- Stars: 13
- Watchers: 4
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
IPSP JS SDK
## Installation
### Node
If you’re using [Npm](https://npmjs.com/) in your project, you can add `ipsp-js-sdk` dependency to `package.json`
with following command:```cmd
npm i --save ipsp-js-sdk
```or add dependency manually:
```json
{
"dependency": {
"ipsp-js-sdk":"^2.0"
}
}
```### Bower
If you’re using [Bower](https://bower.io/) in your project, you can run the following command:
```cmd
bower install ipsp-js-sdk
```### Manual installation
If you do not use NodeJS, you can download the
[latest release](https://github.com/cloudipsp/ipsp-js-sdk/releases).
Or clone from GitHub the latest developer version
```cmd
git clone [email protected]:cloudipsp/ipsp-js-sdk.git
```## Quick start
```html
```
## Basic template
```html
$checkout('Api').scope(function(){
this.request('api.checkout.form','request', { Parameters } ).done(function(model){
model.sendResponse();
console.log(model.attr('order'));
}).fail(function(model){
console.log(model.attr('error'));
});
});
```
## PaymentButton template (ApplePay/GooglePay)
```html
$checkout.get('PaymentButton', {
element: '.payment-button-container',
style: {
type: 'long', // short|long
color: 'black', // black|white
height: 38 // button height
},
data: { Parameters }
}).on('success', function(model) {
console.log('success', model);
}).on('error', function(model) {
console.log('error', model);
});
```
## Parameters
### Host-to-host token
```json
{
"payment_system":"Supported payment systems: card, p24",
"token":"host-to-host generated token",
"card_number":"16/19-digits number",
"expiry_date":"Supported formats: MM/YY, MM/YYYY, MMYY, MMYYYY",
"cvv2":"3-digits number"
}
```Where token is value, returned in paymentgateway response from API enpoint /api/checkout/token (more details in API documentation: https://docs.fondy.eu/docs/page/3/ )
request example:
```
curl -i -X POST \
-H "Content-Type:application/json" \
-d \
'{
"request": {
"server_callback_url": "http://myshop/callback/",
"order_id": "TestOrder1",
"currency": "USD",
"merchant_id": 1396424,
"order_desc": "Test payment",
"amount": 1000
}
}' \
'https://api.fondy.eu/api/checkout/token'
```response example:
```json
{
"response": {
"response_status": "success",
"token": "7ddb3fbb03d60787b3972ef8d6fad0f97f7d2f86"
}
}
```### Client-side merchant ID
```json
{
"payment_system":"Supported payment systems: card, p24",
"merchant_id":"1396424",
"currency":"USD",
"amount":"100.20",
"card_number":"16/19-digits number",
"expiry_date":"Supported formats: MM/YY, MM/YYYY, MMYY, MMYYYY",
"cvv2":"3-digits number"
}
```optional merchant parameters:
```json
{
"email":"customer email address",
"phone":"customer phone number"
}
```
## JS SDK usage examplehttps://jsfiddle.net/fondyeu/jdc9o5cx/
## License
[MIT](https://github.com/cloudipsp/ipsp-js-sdk/blob/HEAD/LICENSE)
## Author
[](https://kosatyi.com/)
[](https://fondy.io/)