vendrhub / vendr-checkout

A ready made checkout flow for Vendr, the eCommerce solution for Umbraco v8+
https://vendr.net/add-ons/vendr-checkout/
MIT License
14 stars 17 forks source link

Hardcoded value for Zero Payment provider alias #10

Closed bjarnef closed 2 years ago

bjarnef commented 4 years ago

I noticed there is a constant for the Zero Payment provider alias here, which is used in most of the code: https://github.com/vendrhub/vendr-checkout/blob/eb72cd71da645a5e2e735e86816e29fcebb832ed/src/Vendr.Checkout/VendrCheckoutConstants.cs#L38

However here it is hardcoded to zeroValue: https://github.com/vendrhub/vendr-checkout/blob/b3a7e6c5293b1411f6e061922d138ff28bc49c08/src/Vendr.Checkout/Web/UI/App_Plugins/VendrCheckout/Views/VendrCheckoutMaster.cshtml#L113

mattbrailsford commented 4 years ago

There is a slight difference here. One is the payment method alias, where the other is the payment provider alias. In the later file it is excluding all payment methods that use the zero value provider in case there’s more than one.

bjarnef commented 4 years ago

Ahh yes of course. I was a bit too fast to report that issue. However doesn't Vendr core has a constant for the Zero Value payment provider alias to use here?

mattbrailsford commented 2 years ago

Update on this, we didn't have constants for these in Vendr core but I've added them now for v2.1.1 however because we are targeting Vendr 2.0.0 atm and don't want to have to force the upgrade we'll have to stick with the magic string in this package for the time being at least.