После создания выплаты payout_batch_id
(payoutId) будет отображаться в консоли в качестве ответа.
Как я могу получить PayPal payout_batch_id
из ответа или любым другим способом и присвоить его переменной (var payoutId
)?
//After the creation of payout, I managed to get a response
paypal.payout.create(create_payout_json, sync_mode, function (error, payout) {
if (error) {
console.log(error.response);
throw error;
} else {
console.log("Create Single Payout Response");
console.log(payout);
}
});
//How to I get this? I need this to check the payout.
var payoutId = ;
paypal.payout.get(payoutId, function (error, payout) {
if (error) {
console.log(error);
throw error;
} else {
console.log("Get Payout Response");
console.log(JSON.stringify(payout));
}
});
Пожалуйста, помогите! Спасибо :)
Я использую ionic и nodejs.