TypeError:undefined不是函数

时间:2014-02-10 06:59:16

标签: javascript node.js angularjs

我将这个模块用于authorize.net支付网关: - https://github.com/durango/authorize-net-cim

我在调用以下方法时遇到错误: -

    throw err;
              ^
TypeError: undefined is not a function

代码:

AuthorizeCIM.updateCustomerProfile(new Authorize.CustomerBasic({
        email: 'brocklesnar@brockkkk.com',
        merchantCustomerId: 1234,
        description: 'New description!',
        customerProfileId: 23954000
    }), function(err, response) {});

AuthorizeCIM与authorize.net完美连接,因为我可以创建个人资料。

我正在遵循确切的文档,但仍然收到错误。

有人可以弄清楚,发生了什么事吗?

1 个答案:

答案 0 :(得分:0)

如果CustomerBasic是实例方法,则代码应为

AuthorizeCIM.updateCustomerProfile((new Authorize).CustomerBasic({
    email: 'brocklesnar@brockkkk.com',
    merchantCustomerId: 1234,
    description: 'New description!',
    customerProfileId: 23954000
}), function(err, response) {});
相关问题