Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8 restrict content pro failed payment issues #9

Merged
merged 9 commits into from
Sep 8, 2023

Conversation

remcotolsma
Copy link
Member

PR for:

We can’t change how Restrict Content Pro works, but we can probably do the following:

  1. No longer expire the RCP membership in the event of a failed payment.
  2. Only save the transaction ID in the RCP payment if it was successful, so the “Retry Payment” feature is available when payment failed.
  3. In the event of a failed payment, forward the customer/visitor to the RCP account page where the “Retry Payment” link is visible.

We don’t have many other options, could this be an improvement that you can work with? Otherwise we have to ask the Restrict Content Pro developers for advice. Or maybe you have ideas of your own to make this even easier?

https://wordpress.org/support/topic/rcp-failed-payment-issues/#post-17016396

@remcotolsma remcotolsma self-assigned this Sep 4, 2023
@remcotolsma remcotolsma linked an issue Sep 4, 2023 that may be closed by this pull request
@rvdsteege
Copy link
Member

I made a change so that in case of failure the RCP payment status will only be updated for the last payment too, to prevent a first payment which expires later will not override the succesful payment status of a second payment.

$this_pronamic_payment_id = (string) $payment->get_id();
$last_pronamic_payment_id = (string) \rcp_get_payment_meta( $rcp_payment_id, '_pronamic_payment_id', true );

if ( empty( $last_pronamic_payment_id ) || $this_pronamic_payment_id === $last_pronamic_payment_id ) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@remcotolsma remcotolsma merged commit 517714b into main Sep 8, 2023
@remcotolsma remcotolsma deleted the 8-restrict-content-pro-failed-payment-issues branch September 8, 2023 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Restrict Content Pro failed payment issues
2 participants