I distribute free EDD plugins through one of my sites, by default I have PayPal enabled for future proofing the checkout and test payments disabled. For whatever reason when I receive a payment notification (via EDD) it shows as a "Test Payment" for items priced at 0.00, which I imagine the customer also sees.
It would be better to show it as "Free Download" if none of the items in the cart hold any monetary value. If a payment is processed via strip/paypal, it would show that label instead.
We'll have to stub the gateway registration system to include a new one called 'Free Download'. Right now it's dependent on a key => value match of the id and the name.
I think once we get #4195, I think we'll have better luck with this.
I've just tested this and can't replicate. If the cart total is 0 then the button text is replaced to Free Download and Purchase Confirmation shows the payment method as Free Purchase. I've tested with PayPal Standard enabled and test payments disabled.
@davidsherlock Please could you confirm that you see the same as me.
@sunnyratilal I think you have got confused by my issue title, it's the purchase receipt email tag (the gateway) not the purchase button (this works fine - as you experienced as well).
Thanks for the clarification; my bad.
PR opened at #6620. In lieu of creating a new gateway, I've simply just changed the method being called from edd_get_gateway_admin_label() to edd_get_gateway_checkout_label(). The latter makes more sense as this sent as part of the Purchase Receipt.
This leads to Free Purchase being shown on the Purchase Receipt which mirrors what is shown on Purchase Confirmation.
Merged.