Support for partial refunds Gravity Forms #119
Labels
enhancement
plugin: gravityforms
Label for Gravity Forms related content.
psp: buckaroo
Label for Buckaroo related content.
Milestone
After pronamic/wp-pay-core@7af53e7 it is possible to keep track of the refunded amount per payment.
Gravity Forms can also keep track of refunds by adding transaction info in a
gf_addon_payment_transaction
table.The
gf_addon_payment_transaction
table has no unique constrains, so addons have to make sure transactions are not added twice. Within the PayPal add-on, I think they assume that the PayPal only calls the IPN URL once.My colleague @rvdsteege had the idea to also keep track of the 'refunded amount' in the Gravity Forms entry. The Gravity Forms
refund_payment
function should then only be called if the Gravity Forms entry 'refunded amount' is bigger than the Pronamic Payment 'refunded amount'.Downside of this approach is that we can't include the payment provider his transactie ID in the
refund_payment
call.https://github.com/wp-premium/gravityforms/blob/2.4.20/includes/addon/class-gf-payment-addon.php#L1908-L1964
The text was updated successfully, but these errors were encountered: