Skip to content

Commit 6052055

Browse files
committed
wrong labelling for customer email property
1 parent 9524cc2 commit 6052055

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

lib/AuthorizeNetGateway.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ AuthorizeNetGateway.prototype.voidTransaction = function voidTransaction(transac
381381
/**
382382
* @inheritDoc
383383
*
384-
* customer email is required
384+
* customerEmail is required
385385
*
386386
*/
387387
AuthorizeNetGateway.prototype.createCustomerProfile = function (payment, billing, shipping, options) {
@@ -391,7 +391,7 @@ AuthorizeNetGateway.prototype.createCustomerProfile = function (payment, billing
391391
var body = {
392392
merchantCustomerId: options.merchantCustomerId || '',
393393
description: options.description || '',
394-
email: billing.email,
394+
email: billing.customerEmail,
395395
paymentProfiles: {
396396
payment: {
397397
creditCard: {

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "authorize-net",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "Node.js SDK for Authorize.net paymenet gateway.",
55
"main": "index.js",
66
"scripts": {

test/test.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe('AuthorizeNet service', function () {
1212

1313
//to avoid duplicate transaction we change the amount
1414
function randomAmount() {
15-
return Math.ceil(Math.random() * 100);
15+
return Math.ceil(Math.random() * 300);
1616
}
1717

1818
beforeEach(function () {
@@ -293,7 +293,7 @@ describe('AuthorizeNet service', function () {
293293

294294
it('should create a subscription without trial period', function (done) {
295295
var subscription = new SubscriptionPlan({
296-
amount: Math.floor(Math.random() * 100)
296+
amount: Math.floor(Math.random() * 300)
297297
})
298298
.withIterationCount('12')
299299
.withPeriodLength(1)
@@ -368,7 +368,7 @@ describe('AuthorizeNet service', function () {
368368
var billing = {
369369
customerFirstName: 'bob',
370370
customerLastName: 'leponge',
371-
371+
customerEmail: '[email protected]'
372372
};
373373

374374
var options = {
@@ -397,7 +397,7 @@ describe('AuthorizeNet service', function () {
397397
var billing = {
398398
customerFirstName: 'bob',
399399
customerLastName: 'leponge',
400-
400+
customerEmail: '[email protected]'
401401
};
402402

403403
service.createCustomerProfile(cc, billing)
@@ -426,7 +426,7 @@ describe('AuthorizeNet service', function () {
426426
var billing = {
427427
customerFirstName: 'bob',
428428
customerLastName: 'leponge',
429-
email: random + '[email protected]'
429+
customerEmail: random + '[email protected]'
430430
};
431431

432432
var profId;
@@ -466,7 +466,7 @@ describe('AuthorizeNet service', function () {
466466
var billing = {
467467
customerFirstName: 'bob',
468468
customerLastName: 'leponge',
469-
email: random + '[email protected]'
469+
customerEmail: random + '[email protected]'
470470
};
471471

472472
var options = {

0 commit comments

Comments
 (0)