首页 > 解决方案 > 类型错误:chargee.hosted_pa​​ge.checkout_one_time_for_items 不是函数

问题描述

将 Chargebee V2 托管页面与 NodeJS 一起使用时会发生此错误,

chargebee.hosted_page.checkout_one_time_for_items({
      customer : {
        id : id
        },
      item_prices : [
        {
          item_price_id : priceId,
          unit_price : price
        }]
    }).request(function(error,result) {
      if(error){
        //handle error
        console.log(error);
        return res.send({error})
      }
      else{
        console.log(result);
        res.send({result});
      }
    });

标签: node.jschargebee

解决方案


推荐阅读