
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
auth-net-cim
Advanced tools
Authorize.net CIM bindings for Node.JS
npm install auth-net-cim
AUTH_CONFIG=/path/to/config.json make tests
config.json
{
"api": "123",
"key": "1234",
"sandbox": true
}
Assuming we're doing:
var Authorize = require('auth-net-types')
, _AuthorizeCIM = require('auth-net-cim')
, AuthorizeCIM = new _AuthorizeCIM({
api: '123',
key: '124',
sandbox: true // false
});
AuthorizeNetCIM.createCustomerProfile({customerProfile: {
merchantCustomerId: 123,
description: 'A customer with a lot of cash.',
email: 'completelyfake@dontemail.com',
customerProfileId: 1234
}}, function(err, response){})
var profile = {
merchantCustomerId: 123,
description: 'A customer with a lot of cash.',
email: 'completelyfake@dontemail.com',
customerProfileId: 1234
}
var bankAccount = new Authorize.BankAccount({
accountType: 'businessChecking',
routingNumber: '121042882',
accountNumber: '123456789123',
nameOnAccount: 'Jane Doe',
bankName: 'Pandora Bank'
})
, payment = new Authorize.Payment({
bankAccount: bankAccount
});
profile.paymentProfiles = new Authorize.PaymentProfiles({
customerType: 'business',
payment: payment
});
AuthorizeNetCIM.createCustomerProfile({customerProfile: profile}, function(err, response){});
var options = {
customerType: 'individual',
payment: {
creditCard: new Authorize.CreditCard({
cardNumber: '4111111111111111',
expirationDate: '2012-10'
})
}
}
AuthorizeCIM.createCustomerPaymentProfile({
customerProfileId: '123',
paymentProfile: options
}, function(err, response) {});
AuthorizeNetCIM.createCustomerProfileFromTransaction({customerProfile: {
transactionId: 1234
}}, function(err, response){})
AuthorizeCIM.createCustomerShippingAddress({
customerProfileId: '123',
shippingAddress: new Authorize.ShippingAddress({
firstName: 'Bob',
lastName: 'Smith',
address: '123 Sesame St',
city: 'Gainesville',
state: 'FL',
zip: 32601,
country: 'us'
})
}, function(err, response) {});
AuthorizeCIM.updateCustomerProfile(new Authorize.CustomerBasic({
email: 'newfakeemail@email.com',
merchantCustomerId: 1234,
description: 'New description!',
customerProfileId: this.customerProfileId
}), function(err, response) {});
AuthorizeCIM.updateCustomerPaymentProfile({
customerProfileId: '123',
paymentProfile: new Authorize.PaymentProfile({
customerPaymentProfileId: 444,
customerType: 'business',
payment: new Authorize.Payment({
creditCard: new Authorize.CreditCard({
cardNumber: '4007000000027',
expirationDate: '2012-10',
cardCode: 111
})
})
})
}, function(err, response) {});
AuthorizeCIM.updateCustomerShippingAddress({
customerProfileId: '123',
address: new Authorize.ShippingAddress({
firstName: 'John',
lastName: 'Smith',
state: 'TX',
country: 'US',
zip: 11111,
customerAddressId: null
})
}, function(err, response) {});
AuthorizeCIM.getCustomerProfile('123', function(err, response) {});
AuthorizeCIM.getCustomerPaymentProfile({
customerProfileId: '123',
customerPaymentProfileId: '1234'
}, function(err, response) {});
AuthorizeCIM.getCustomerShippingAddress({
customerProfileId: '123',
customerAddressId: '1234'
}, function(err, response) {});
AuthorizeCIM.validateCustomerPaymentProfile({
customerProfileId: '123',
customerPaymentProfileId: '1234',
validationMode: 'testMode' // liveMode
}, function(err, response) {});
var transaction = {
amount: 56.01,
tax: {
amount: 12.44,
name: 'State Tax',
description: 'FL'
},
shipping: {
amount: 5.00,
name: 'FedEx Ground',
description: 'No Free Shipping Option'
},
customerProfileId: '123',
customerPaymentProfileId: '1234',
order: {
invoiceNumber: 1337
}
};
AuthorizeCIM.createCustomerProfileTransaction('AuthCapture' /* AuthOnly, CaptureOnly, PriorAuthCapture */, transaction, function(err, response) {});
AuthorizeCIM.updateSplitTenderGroup({
splitTenderId: 1,
splitTenderStatus: 'voided'
}, function(err, response) {});
AuthorizeCIM.deleteCustomerPaymentProfile({
customerProfileId: '123',
customerPaymentProfileId: '1234'
}, function(err, response) {});
AuthorizeCIM.deleteCustomerShippingAddress({
customerProfileId: '123',
customerAddressId: '1234'
}, function(err, response) {});
AuthorizeCIM.deleteCustomerProfile('123', function(err, response) {});
AuthorizeCIM.setExtraOptions({
x_duplicate_window: 0
});
AuthorizeCIM.createCustomerProfileTransaction(..., function(err) {
// Then clear the extra options if needed
AuthorizeCIM.setExtraOptions();
});
Version >= 2.x.x
has a breaking change, all values are returned as strings rather than strings and numbers (unless the value is an object, array, etc).
FAQs
Authorize.net CIM bindings for Node.JS
We found that auth-net-cim 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
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.