pronamic / wp-pronamic-pay

The Pronamic Pay plugin allows you to easily accept payments with payment methods like credit card, iDEAL, Bancontact and Sofort through a variety of payment providers on your WordPress website.
https://pronamicpay.com
35 stars 14 forks source link

Make gateway configurations JSON serializable and save it with payments and subscriptions #196

Open remcotolsma opened 3 years ago

remcotolsma commented 3 years ago

A gateway configuration can be changed at any time. This may affect payment status updates or subscription follow-up payments. It can therefore be nice to save a copy of the gateway configuration in the payment.

Internal Basecamp to-do: https://basecamp.com/1810084/projects/10966871/todos/376801431

Also by making the gateway configurations JSON serializable, we may be able to get rid of the post meta fields in gateway configurations. If we continue to use a custom post type for the gateway configurations, the configuration can be stored completely in post_content with post_mime_type = application/json (as we also do with payments and subscriptions).

rvdsteege commented 3 years ago

I'm not sure if storing gateway configuration in payments/subscriptions is efficient (we'll end up with a lot of duplicate data, while we are also trying to increase efficiency in other areas) and always desired. Before preparing this in #231.

Let say we add a setting for the subscription recurring payment description and this gets updated, it won't get updated in existing subscriptions (but maybe this should not be a gateway setting in the first place then).