pronamic / pronamic-pay-with-mollie-for-ninja-forms

This WordPress plugin connects your Ninja Forms forms to payment provider Mollie via the Pronamic Pay plugin built by Pronamic.
https://wordpress.org/plugins/pronamic-pay-with-mollie-for-ninja-forms/
GNU General Public License v2.0
1 stars 0 forks source link

Payment Methods fields has no options. #3

Open kjtolsma opened 6 months ago

kjtolsma commented 6 months ago

If i enable the plugin and add the "Payment Methods" field it has no options. In the form i can't select a Payment Method.

payment-methods
rvdsteege commented 6 months ago

This is probably caused by no 'Collect Payment' action being added to the form yet:

https://github.com/pronamic/wp-pronamic-pay-ninjaforms/blob/4d1cd150afdb2b3d62c91de356b97e3d903654e6/src/PaymentMethodsField.php#L146-L158

remcotolsma commented 6 months ago

That is indeed correct, specifically no "Collect Payment" actions with the "Pronamic Pay" gateway:

https://github.com/pronamic/wp-pronamic-pay-ninjaforms/blob/4d1cd150afdb2b3d62c91de356b97e3d903654e6/src/NinjaFormsHelper.php#L38-L64

And if there is a "Collect Payment" actions with the "Pronamic Pay" gateway for the relevant form, there must also be a Pronamic Pay gateway configuration available:

https://github.com/pronamic/wp-pronamic-pay-ninjaforms/blob/4d1cd150afdb2b3d62c91de356b97e3d903654e6/src/NinjaFormsHelper.php#L92-L110

This actually brings us back to the next issue:

Should we simplify this by working with one general list of active payment methods within a site?

I had already experimentally added options for this in the past:

rvdsteege commented 1 month ago

Should we simplify this by working with one general list of active payment methods within a site?

@remcotolsma If there is no configuration added yet and therefore no payment methods enabled yet, would a payment method field then have any options or is still empty as in @kjtolsma his original post?

remcotolsma commented 1 month ago

If there is no configuration added yet and therefore no payment methods enabled yet

The configuration is not per se relevant if we have a general list of payment methods with a status. Without configuration, payment methods can be active, we can give a number of commonly used payment methods the status 'active' by default. This way, the payment method field can be filled with the standard payment method options. Whether paying via those payment methods works will of course depend on the configuration later.