My name is David. I am trying to develop an App using this plugin for SumUPp terminal payments. Everything is working ok until I pay with my credit card. Here is my code:
this.sumUp.pay(1, 'EUR').then((res: SumUpPayment) => {
alert("PAY (OK)");
var data = "";
for(var i=0; i<props.length; i++){ data += props[i] + " --> " + res[props[i]] + "\n"; }
alert(data);
})
.catch((error: SumUpPayment) => {
alert("PAY (ERROR)");
var data = "";
for(var i=0; i<props.length; i++) { data += props[i] + " --> " + error[props[i]] + "\n"; }
alert(data);
});
My problem is I am getting an error on catch clause when payment is working. I get a SumUpPayment object with SUCCESFULL state and I do not understand why. But, when payment goes wrong, for example (no credit card detected on time), I am not getting any error.
Hi!
My name is David. I am trying to develop an App using this plugin for SumUPp terminal payments. Everything is working ok until I pay with my credit card. Here is my code:
this.sumUp.pay(1, 'EUR').then((res: SumUpPayment) => { alert("PAY (OK)"); var data = ""; for(var i=0; i<props.length; i++){ data += props[i] + " --> " + res[props[i]] + "\n"; } alert(data); }) .catch((error: SumUpPayment) => { alert("PAY (ERROR)"); var data = ""; for(var i=0; i<props.length; i++) { data += props[i] + " --> " + error[props[i]] + "\n"; } alert(data); });
My problem is I am getting an error on catch clause when payment is working. I get a SumUpPayment object with SUCCESFULL state and I do not understand why. But, when payment goes wrong, for example (no credit card detected on time), I am not getting any error.
Could you please help me?
Thank you so much.