Page 1 of 1

Capture behavior changed from R6 to R8

Posted: Tue Jul 15, 2014 7:46 am
by abradley
Small change to the way the capture payment screen worked now that we are on R8. It will allow us to accidentally charge the customer too much sometimes and then we have to wait a day to refund. One way this could happen is if we remove an item from an order, then the balance would be less than the authorization. We can always capture a second payment easily, refunds have to wait a day so we would rather have the system protect us from the more costly mistake.

Before the capture amount would automatically populate to the order balance. Now it auto populates to the original authorization amount. I have attached a screenshot for clarity. In the screenshot we would like the capture population to be 1,527.82 instead of the $1,588.79 which was the previous behavior.

Image

Re: Capture behavior changed from R6 to R8

Posted: Tue Jul 15, 2014 8:30 am
by sweeperq
good to know, thanks!

Re: Capture behavior changed from R6 to R8

Posted: Wed Jul 16, 2014 3:55 am
by jmestep
That is weird. They made a change in R8 and it looks like it might not be behaving as intended. Both files have

Code: Select all

    decimal rem = _Payment.Transactions.GetRemainingAuthorized();
                decimal bal = _Order.GetBalance(false);
Then R6 has

Code: Select all

                CaptureAmount.Text = string.Format("{0:F2}", bal);

R8 has

Code: Select all

  CaptureAmount.Text = string.Format("{0:F2}", rem);

Re: Capture behavior changed from R6 to R8

Posted: Wed Jul 16, 2014 5:42 am
by abradley
So this

Code: Select all

CaptureAmount.Text = string.Format("{0:F2}", rem);
just needs to be reverted to this then it looks like.

Code: Select all

CaptureAmount.Text = string.Format("{0:F2}", bal);

Re: Capture behavior changed from R6 to R8

Posted: Wed Jul 16, 2014 11:21 am
by Katie
I reported this as a bug, but I still can't figure out why the code was changed between the two versions.

Re: Capture behavior changed from R6 to R8

Posted: Tue Sep 02, 2014 2:56 am
by mazhar
The change we made in Gold R7 was to address the exact inverse of this case. In this case you removed the items which is resulting in order balance less the authorized amount. Previously it was reported by a customer that when they add items to an existing order with authorized payment, capture fails due to capture amount being greater then authorized amount.

I think the correct fix to deal with both situations should be first we check if authorized amount is greater then balance. If it is then we pre populate with balance amount otherwise we use authorized amount. So you need to use

Code: Select all

CaptureAmount.Text = string.Format("{0:F2}", rem > bal ? bal : rem);

Re: Capture behavior changed from R6 to R8

Posted: Tue Sep 02, 2014 5:03 am
by abradley
mazhar wrote:The change we made in Gold R7 was to address the exact inverse of this case. In this case you removed the items which is resulting in order balance less the authorized amount. Previously it was reported by a customer that when they add items to an existing order with authorized payment, capture fails due to capture amount being greater then authorized amount.

I think the correct fix to deal with both situations should be first we check if authorized amount is greater then balance. If it is then we pre populate with balance amount otherwise we use authorized amount. So you need to use

Code: Select all

CaptureAmount.Text = string.Format("{0:F2}", rem > bal ? bal : rem);
This works great, thanks for the explanation. I think this behavior is well designed. Thanks mazhar!