if I may suggest a slight API change in the workflow.
From a Java Standpoint, the SumUpPayment class looks like a POJO. Its sole purpose should be holding data and representing your payment entity.
This line brings a high coupling between the android world and the POJO itself...
// start the payment process
sumUpPayment.openPaymentActivity(this);
I am guessing this launches one of SumUp's intents and processes the results before returning back to the activity when done.
I wonder if there is another way of doing so.
By separating the payment from the activity handling, something like this could be imagined:
Hi guys,
if I may suggest a slight API change in the workflow. From a Java Standpoint, the SumUpPayment class looks like a POJO. Its sole purpose should be holding data and representing your payment entity.
This line brings a high coupling between the android world and the POJO itself...
I am guessing this launches one of SumUp's intents and processes the results before returning back to the activity when done. I wonder if there is another way of doing so. By separating the payment from the activity handling, something like this could be imagined: