better-payment / bp-plugin-shopware6-api2

Shopware 6 Plugin for Better Payment API2
Other
0 stars 0 forks source link

Store Better Payment transaction ID as property of order transaction #19

Closed hasanzade-hasan closed 1 year ago

hasanzade-hasan commented 1 year ago

In order to store Better Payment transaction ID we need better_payment_transaction_id property on order_transaction table. We can achieve this in one of the following ways

Below resource shows quick differences between last two approaches:

image https://www.brocksi.net/blog/customfields-properties-entity-extensions-shopware-6/

We chose to implement the last approach, which needs to install custom fields during plugin install in case we need this custom field to be managed by shop owner: https://developer.shopware.com/docs/guides/plugins/plugins/framework/custom-field/add-custom-field#adding-an-actual-custom-field Actually we don't need that!!!

hasanzade-hasan commented 1 year ago

Just used this code snippet to store Better Payment transaction ID as property of order transaction. No need to allow shop owner to manage this data and property. So CustomFieldsInstaller class not anymore required to be implemented.

image