Esempio n. 1
0
            ///<summary>Performs base XWebInputDTGForPayment behavior and creates PaymentWeb row.</summary>
            protected override void PostProcessOutput(XWebResponse response)
            {
                //Verify result and set response.PayNote.
                base.PostProcessOutput(response);
                response.Alias = _cc.XChargeToken;
                if (InsertPaymentOnApproval)                  //Insert Payment, PaySplit, and set FK.
                {
                    response.PaymentNum = Payments.InsertFromXWeb(
                        _patNum, _provNum, _clinicNum,
                        (InsertPositivePayment ? _amount : -_amount),
                        response.GetFormattedNote(InsertPositivePayment), "", CreditCardSource.XWeb);                      //todo: create a formatted receipt to show the web user after the payment has been accepted
                }
                //XWeb's Decline Minimizer will pass us back updated card information. Update our copy when necessary.
                bool update = false;

                if (_cc.CCExpiration != response.AccountExpirationDate)
                {
                    _cc.CCExpiration = response.AccountExpirationDate;
                    update           = true;
                }
                if (_cc.CCNumberMasked != response.MaskedAcctNum)
                {
                    _cc.CCNumberMasked = response.MaskedAcctNum;
                    update             = true;
                }
                if (update)
                {
                    CreditCards.Update(_cc);
                }
            }
Esempio n. 2
0
 protected override void PostProcessOutput(XWebResponse response)
 {
     //Verify result and set response.PayNote.
     base.PostProcessOutput(response);
     //Insert Payment, PaySplit, and set FK.
     response.PaymentNum = Payments.InsertFromXWeb(
         _patNum, _provNum, _clinicNum,
         (_insertPositivePayment ? response.Amount : -response.Amount),
         response.GetFormattedNote(_insertPositivePayment), "", CreditCardSource.XWeb);
 }