internal virtual void OnPaymentProcessed(PaymentResult result, int error) { if (error != 0) { Errored(this, error); } else if (PaymentProcessed != null) { PaymentProcessed(this, result); } }
internal async Task <PaymentResult> HandlePaymentCallback(int error, Native.PaymentInfo info) { var result = new PaymentResult(); if (error == 0) { result.Fill(info); await result.BuildAccepted(EncryptionKey); } else { result.BuildErrored(error); } return(result); }