Brain Tree无法使用nodejs托管付款

时间:2016-02-13 08:13:30

标签: node.js braintree

var charge = {
    merchantAccountId: 'trinisofttechnologies

> yead

',
    serviceFeeAmount: '1.00',
    amount: '100.00',
    paymentMethodNonce: nonce,
    options: {
      submitForSettlement: true,
      holdInEscrow: true
    }
  }

gateway.transaction.sale(charge, function (err, result) {
    console.log(err, result);
    if(err || !result.success){
      res.end("Payment Failed: "+(result && result.message));
    }else{
      gateway.transaction.holdInEscrow(result.transaction.id, function (err, result) {
        console.log(err, result);
        if(err || !result.success){
          res.end("Payment Failed: "+(result && result.message));
        }else{
          res.end("Payment hold in escrow!");
        }
      });
    }
  });

// Service fee not supported on master merchant account. Transaction could not be held in escrow.

0 个答案:

没有答案