Skip to content
This repository has been archived by the owner on May 27, 2019. It is now read-only.

PaymentProviderMethod is now able to use an Amount, a Percentage and a combination of both. #30

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

WebstudioThomHubers
Copy link

No description provided.

//{
// return Convert.ToInt32(OrderTotalWithoutPaymentInCents * PaymentProviderOrderPercentage / 10000);
//}
//return PaymentProviderAmount;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't leave out commented code.

Removed out commented code.
Some indents fixed.
@WebstudioThomHubers
Copy link
Author

@kappy Thanks for noticing, fixed that.

@joaomatossilva
Copy link

I will let @mnwsmit comment on this, because the code is not formatted properly. This project uses tabs instead of spaces.

@mnwsmit
Copy link
Collaborator

mnwsmit commented Mar 19, 2015

Functionally this is quite a big PR. I currently don't have time to review it, sorry

@WebstudioThomHubers
Copy link
Author

Fine for me. Built this functionality mainly for my own application. I think, however, that its an improvement to your software.

@@ -44,7 +44,7 @@ public class Order : IConvertibleToOrderInfo
public DateTime? FulfillDate;
public PaymentInfo PaymentInfo;
public int PaymentProviderPrice;
public int? PaymentProviderOrderPercentage;
public decimal? PaymentProviderOrderPercentage;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you really need to use percentages with more than 2 decimal places? If not, please keep using the same "philosophy" of having a percentage represented in an int * 100

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should move on to converting that to a decimal but we don't know the code that is already relying on PaymentProviderOrderPercentage being a int * 100

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No I don't need more places, but the end user should be able to enter the value as 2.80% or 0.028 instead of 280 (which is confusing).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope not as well.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't care how to store/process the percentage, as long as the field is clear for end-users.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants