Привет! Мне нужно отправить дату транзакции на сервер после того, как этот платеж ngx-PayPal будет выполнен.Но я получил эту ошибку: Cannot read property 'http' of undefined
вот мой код:
payPalConfig = {
env: 'sandbox',
client: {
sandbox: '########################',
production: '#######################'
},
commit: true,
// payment() is called when the button is clicked
payment: function(data, actions) {
// Make a call to the REST api to create the payment
let prezzo = cookieService.get('importo');
return actions.payment.create({
payment: {
transactions: [
{
amount: { total: prezzo, currency: 'EUR' }
}
]
}
})
},
// onAuthorize() is called when the buyer approves the payment
onAuthorize: function(data, actions) {
// Make a call to the REST api to execute the payment
return actions.payment.execute().then(function(response) {
this.http.post('https://dev.miosit.it/aggiorna-abbonamento', response).subscribe(data=> {});
});
}
};
Как я могу получить http, работающий в этом случае?