Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
spreedly-api
Advanced tools
Readme
This API supported Spreedly's v1 standard REST-style API that accepts/returns JSON requests and Here is the [API reference] (https://docs.spreedly.com/reference/api/v1)
You can find examples here. This will help you for faster implmentation of 'spreedly-api'
npm install spreedly-api --save
Run the installation:
npm install
Set your Environment Key and Access Secret. This is available in Spreedly Document.
var spreedly = require('spreedly-api')('environmentKey','accessSecret');
spreedly.gateways.create({
'gateway': {
'gateway_type': 'test'
}
}, function (error, response) {
if (error) {
console.log('error ', error);
return;
}
console.log('response', response);
// asynchronously called
});
spreedly.gateways.create({
'gateway': {
'gateway_type': 'stripe',
'login': 'your Stripe API secret'
}
}, function (error, response) {
if (error) {
console.log('error ', error);
return;
}
console.log('response', response);
// asynchronously called
});
spreedly.gateways.show('7UcPnN6rDdk7nmmCl2LESVkfj2w', function (error, response) {
if (error) {
console.log('error ', error);
return;
}
console.log('response', response);
});
spreedly.payment.create({
'payment_method': {
'credit_card': {
'first_name': 'Joe',
'last_name': 'Jones',
'number': '5555555555554444',
'verification_value': 423,
'month': '3',
'year': '2032'
},
'email': 'joey@example.com'
}
}, function (error, response) {
if (error) {
console.log('error ', error);
return;
}
console.log('response', response);
// asynchronously called
});
spreedly.payment.create({
'payment_method': {
'bank_account': {
'first_name': 'Jon',
'last_name': 'Doe',
'bank_routing_number': '021000021',
'bank_account_number': '9876543210',
'bank_account_type': 'checking',
'bank_account_holder_type': 'personal'
},
'email': 'jon.doe@example.com',
'data': {
'my_payment_method_identifier': 448,
'extra_stuff': {
'some_other_things': 'Can be anything really'
}
}
}
}, function (error, response) {
if (error) {
console.log('error ', error);
return;
}
console.log('response', response);
// asynchronously called
});
spreedly.purchase.create('7UcPnN6rDdk7nmmCl2LESVkfj2w', {
'transaction': {
'payment_method_token': '56wyNnSmuA6CWYP7w0MiYCVIbW6',
'amount': 100,
'currency_code': 'USD'
}
}, function (error, response) {
if (error) {
console.log('error ', error);
return;
}
console.log('response', response);
});
spreedly.purchase.usingCreditCard('7UcPnN6rDdk7nmmCl2LESVkfj2w', {
'transaction': {
'credit_card': {
'first_name': 'Joe',
'last_name': 'Smith',
'number': '4111111111111111',
'verification_value': '123',
'month': '12',
'year': '2018'
},
'amount': 100,
'currency_code': 'USD'
}
}, function (error, response) {
if (error) {
console.log('error ', error);
return;
}
console.log('response', response);
});
spreedly.purchase.usingBank('7UcPnN6rDdk7nmmCl2LESVkfj2w', {
'transaction': {
'bank_account': {
'first_name': 'Joe',
'last_name': 'Smith',
'bank_routing_number': '021000021',
'bank_account_number': '9876543210'
},
'amount': 100,
'currency_code': 'USD'
}
}, function (error, response) {
if (error) {
console.log('error ', error);
return;
}
console.log('response', response);
});
spreedly.purchase.usingPaymentMethod('FPKawD8tNdpdavp0wCAUhK7xaNG', {
'transaction': {
'amount': 80
}
}, function (error, response) {
if (error) {
console.log('error ', error);
return;
}
console.log('response', response);
});
spreedly.authorize.create('7UcPnN6rDdk7nmmCl2LESVkfj2w', {
'transaction': {
'payment_method_token': '56wyNnSmuA6CWYP7w0MiYCVIbW6',
'amount': 100,
'currency_code': 'USD'
}
}, function (error, response) {
if (error) {
console.log('error ', error);
return;
}
console.log('response', response);
});
spreedly.authorize.usingCreditCard('7UcPnN6rDdk7nmmCl2LESVkfj2w', {
'transaction': {
'credit_card': {
'first_name': 'Joe',
'last_name': 'Smith',
'number': '4111111111111111',
'verification_value': '123',
'month': '12',
'year': '2018'
},
'amount': 100,
'currency_code': 'USD'
}
}, function (error, response) {
if (error) {
console.log('error ', error);
return;
}
console.log('response', response);
});
spreedly.capture.fullAmount('M1D0HR7iYJUmcP8aHr6motPGCPU', function (error, response) {
if (error) {
console.log('error ', error);
return;
}
console.log('response', response);
});
spreedly.capture.partialAmount('M1D0HR7iYJUmcP8aHr6motPGCPU', {
'transaction': {
'amount': 50,
'currency_code': 'USD'
}
}, function (error, response) {
if (error) {
console.log('error ', error);
return;
}
console.log('response', response);
});
spreedly.certificates.list(function (error, response) {
if (error) {
console.log('error ', error);
return;
}
console.log('response', response);
// asynchronously called
});
spreedly.certificates.create({
'certificate': {
'algorithm': 'ec-prime256v1',
'cn': 'MyApp ApplePay Production Certificate',
'email_address': 'security@yourorg.com'
}
}, function (error, response) {
if (error) {
console.log('error ', error);
return;
}
console.log('response', response);
// asynchronously called
});
spreedly.certificates.update('OLK1a6xQxWes8qKRb2EpuEXNkIS', {
'certificate': {
'pem': '-----BEGIN CERTIFICATE-----\nMIIEiTCCBC6gAwIBAgIIFRZ9ouKAzqwwCgYIKoZIzj0EAwIwgYAxNDAyBgNVBAMM\nK0FwcGxlIFdvcmxkd2lkZSBEZXZlbG9wZXIgUmVsYXRpb25zIENBIC0gRzIxJjAk\nBgNVBAsMHUFwcGxlIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRMwEQYDVQQKDApB\ncHBsZSBJbmMuMQswCQYDVQQGEwJVUzAeFw0xNTAyMTkyMDMzMzBaFw0xNzAzMjAy\nMDMzMzBaMIG5MTowOAYKCZImiZPyLGQBAQwqbWVyY2hhbnQuY29tLnNlYXRnZWVr\nLlNwcmVlZGx5QXBwbGVQYXlUZXN0MUAwPgYDVQQDDDdNZXJjaGFudCBJRDogbWVy\nY2hhbnQuY29tLnNlYXRnZWVrLlNwcmVlZGx5QXBwbGVQYXlUZXN0MRMwEQYDVQQL\nDAo5QjNRWTlXQlo1MRcwFQYDVQQKDA5TZWF0R2VlaywgSW5jLjELMAkGA1UEBhMC\nVVMwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQhoBD6FaOXUJq3e4EoI7rWemTz\nhLaPlAdF87WzmbhWKVNJ9LAEhrBjAtj6is765Ow2dnYta0QPF9EJoubwKOjKo4IC\nVTCCAlEwRwYIKwYBBQUHAQEEOzA5MDcGCCsGAQUFBzABhitodHRwOi8vb2NzcC5h\ncHBsZS5jb20vb2NzcDA0LWFwcGxld3dkcmNhMjAxMB0GA1UdDgQWBBQMV4lSAdev\nm6sv1MVm5yR0gWij+jAMBgNVHRMBAf8EAjAAMB8GA1UdIwQYMBaAFIS2hMw6hmJy\nFlmU6BqjvUjfOt8LMIIBHQYDVR0gBIIBFDCCARAwggEMBgkqhkiG92NkBQEwgf4w\ngcMGCCsGAQUFBwICMIG2DIGzUmVsaWFuY2Ugb24gdGhpcyBjZXJ0aWZpY2F0ZSBi\neSBhbnkgcGFydHkgYXNzdW1lcyBhY2NlcHRhbmNlIG9mIHRoZSB0aGVuIGFwcGxp\nY2FibGUgc3RhbmRhcmQgdGVybXMgYW5kIGNvbmRpdGlvbnMgb2YgdXNlLCBjZXJ0\naWZpY2F0ZSBwb2xpY3kgYW5kIGNlcnRpZmljYXRpb24gcHJhY3RpY2Ugc3RhdGVt\nZW50cy4wNgYIKwYBBQUHAgEWKmh0dHA6Ly93d3cuYXBwbGUuY29tL2NlcnRpZmlj\nYXRlYXV0aG9yaXR5LzA2BgNVHR8ELzAtMCugKaAnhiVodHRwOi8vY3JsLmFwcGxl\nLmNvbS9hcHBsZXd3ZHJjYTIuY3JsMA4GA1UdDwEB/wQEAwIDKDBPBgkqhkiG92Nk\nBiAEQgxAODlDQjI1MDkxOTI0RDY3RjlFMEM2QUVDMzA0MENBMkFGNzA4MEYzRTBG\nQ0NFMTZBOTY5RDkyMUE0QkM5RTA1RjAKBggqhkjOPQQDAgNJADBGAiEAvKYdzDtD\nQ87guVNkybbcEY1Y/nXO9Ry+4fVDwXYMET0CIQDEiK1+xSSziPZ/PPQHF8MCWsD0\nLDW0aLigLHbDgQcrXA==\n-----END CERTIFICATE-----\n'
}
}, function (error, response) {
if (error) {
console.log('error ', error);
return;
}
console.log('response', response);
});
spreedly.transactions.list(function (error, response) {
if (error) {
console.log('error ', error);
return;
}
console.log('response', response);
// asynchronously called
});
spreedly.transactions.show('9xYaLekcLzT6gRet1CmbXUU8JsL', function (error, response) {
if (error) {
console.log('error ', error);
return;
}
console.log('response', response);
// asynchronously called
});
spreedly.transactions.transcript('9xYaLekcLzT6gRet1CmbXUU8JsL', function (error, response) {
if (error) {
console.log('error ', error);
return;
}
console.log('response', response);
// asynchronously called
});
Originally by Bhushankumar Lilapara (bhushankumar.lilapara@gmail.com).
FAQs
Spreedly API wrapper
The npm package spreedly-api receives a total of 46 weekly downloads. As such, spreedly-api popularity was classified as not popular.
We found that spreedly-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.