https://github.com/thebumpaster/pikpay
JavaScript Library for processing pikpay requests
https://github.com/thebumpaster/pikpay
Last synced: about 1 year ago
JSON representation
JavaScript Library for processing pikpay requests
- Host: GitHub
- URL: https://github.com/thebumpaster/pikpay
- Owner: TheBumpaster
- License: apache-2.0
- Created: 2018-05-03T07:08:40.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-03T07:20:25.000Z (about 8 years ago)
- Last Synced: 2025-05-18T18:15:02.901Z (about 1 year ago)
- Language: JavaScript
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pikpay
To use the package first grab your credentials from your PikPay account. You will need your Authenticity Token (API_KEY) and Key (SECRET_KEY). Before any request, an instance of Gateway has to be constructed.
``` javascript
var connection = new Gateway('yourendpoint', 'yourapikey', 'yoursecretkey');
var data = {
'amount': 50,
'expiration-date': 2102,
'cvv': 553,
'pan': 546400000587798528,
'ip': '128.93.108.112',
'order-info': 'The Best Order',
'ch-address': 'Mejdan bb',
'ch-city': 'Bosanski Petrovac',
'ch-country': 'Bosnia and Herzegovina',
'ch-email': 'hadzicismar67@gmail.com',
'ch-full-name': 'Ismar Hadzic',
'ch-phone': '38762591077',
'ch-zip': '77250',
'currency': 'BAM', //EUR, BAM, HRK
'order-number': 'order-123a',
'language': 'en',
};
if ( connection.authorize(data) ) {
// Do something on success
} else {
// Return some error
}
connection.authorize(data);
connection.capture(data);
connection.purchase(data);
connection.refund(data);
connection.void(data);
```
Thanks to Selim Salihovic for providing PHP library, check it here:
https://github.com/SelimSalihovic/pikpay-php