Closed remcotolsma closed 2 years ago
I searched the Ninja Forms codebase for halt
and found the following:
I could not find any information about halt
on https://developer.ninjaforms.com/.
Did found the open internal Basecamp to-do "Ninja Forms » Uitgestelde notificaties", the feature was requested by a few customers.
@rvdsteege do you remember (or find out) if we copied the https://github.com/pronamic/wp-pronamic-pay-ninjaforms/commit/2e299dd4fd27913722ff2dd32b8b01ce48c64a20 implementation from something?
do you remember (or find out) if we copied the 2e299dd implementation from something?
The Ninja Forms PayPal Express plugin uses the halt
mechanism.
do you remember (or find out) if we copied the 2e299dd implementation from something?
The Ninja Forms PayPal Express plugin uses the
halt
mechanism.
I don't quite understand the cookie and session code yet, they don't seem to use that in https://github.com/pronamic/ninja-forms-paypal-express/.
The PayPal Express add-on also uses the halt/resume mechanism:
However, the mechanism provided by Ninja Forms to resume processing of form actions uses the current session (managed by Ninja Forms). That would mean 'order fulfilment' will only work if the user returns immediately after payment, within the current session. From experience, we know that that is not always the case and it could also be initiated by a webhook request. The PayPal Express add-on does not support PayPal IPN, so they didn't have to cope with the issue of resuming a specific session.
Therefore, we're storing the Ninja Forms session cookie to be able to restore that specific session and then resume processing of form actions:
I agree that e.g. getting the cookie from the headers is quite ugly, but I don't think there is (or at least was) any other way to get to the same end result.
Source: https://wordpress.org/support/topic/receive-ninja-form-email-even-when-the-payment-failed/
@rvdsteege
Source: https://wordpress.org/support/topic/receive-ninja-form-email-even-when-the-payment-failed/#post-15124596
According to @rvdsteege caused by:
https://github.com/pronamic/wp-pronamic-pay-ninjaforms/blob/1b18369f1dbdb5734483f246c1d394089acaed8e/src/PaymentGateway.php#L156