Authorizenet.authorizeTransactionRequest()

pass credentials to authorize.net to setup a payment transaction

nodejs version 1.0.6 from https://www.npmjs.com/package/authorize-net. run npm install -s authorize-net@1.0.6

Usage

Hover over inputs/exits for more info.

var Authorizenet = require('machinepack-authorizenet');


// pass credentials to authorize.net to setup a payment transaction

Authorizenet.authorizeTransactionRequest({

apiLoginId: 'xxxx4Tk9K',

transactionKey: 'xxxxN24Hqm7C5V98',

testMode: true,

amount: 500,

currency: 'usd',

cardnumber: '4242424242424242',

cardexpmonth: 12,

cardexpyear: 2016,

cvv2: '123',

billingFirstName: 'John',

billingLastName: 'Smith',

billingAddress1: '500 %th Ave',

billingCity: 'New York',

billingState: 'NY',

billingPostalCode: '10011',

billingCountry: 'USA',

secretKey: 'Simon',

description: 'This notable charge was for several gallons of mayonnaise!',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// Invalid or unprovided API Login Id and transactionKey.

wrongOrNoKey: function () {

 

},

// OK.

success: function () {

 

},

});

Inputs

apiLoginId required

The AN API LOGIN ID

'xxxx4Tk9K'
transactionKey required

Your TRANSACTION KEY .

'xxxxN24Hqm7C5V98'
testMode required

true or false this.endpoint = options.testMode === true ? 'https://apitest.authorize.net/xml/v1/request.api' : 'https://api.authorize.net/xml/v1/request.api';

true
amount required

The amount to charge, in the smallest currency unit (e.g. 500 to charge $5.00)

500
currency required

3-letter ISO code for currency.

'usd'
cardnumber required

The cc # to charge.

'4242424242424242'
cardexpmonth required

The cc expiration month.

12
cardexpyear required

The cc expiration year.

2016
cvv2 required

needed for ccv.

'123'
billingFirstName required

billingFirstName.

'John'
billingLastName required

billingLastName.

'Smith'
billingAddress1 required

billingAddress1.

'500 %th Ave'
billingCity required

billingCity.

'New York'
billingState required

billingState.

'NY'
billingPostalCode required

billingPostalCode.

'10011'
billingCountry required

billingCountry.

'USA'
secretKey

Your secret .

'Simon'
description

An arbitrary string to attach to the charge object in Stripe.

'This notable charge was for several gallons of mayonnaise!'

Exits

error

An unexpected error occurred.

wrongOrNoKey

Invalid or unprovided API Login Id and transactionKey.

success

OK.