示例#1
0
 internal virtual void OnPaymentProcessed(PaymentResult result, int error)
 {
     if (error != 0)
     {
         Errored(this, error);
     }
     else if (PaymentProcessed != null)
     {
         PaymentProcessed(this, result);
     }
 }
示例#2
0
        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);
        }