1. I want my customers to have full access to the course

Hello,
1. I want my customers to have full access to the course even after they finish to pay
the 3 installments. Can I override this somehow?
2. I set up a stripe (in sandbox) recurring payment of 3 installments (once a day) for testing purpose. It makes the first installment but not the second. I don't think is a cron job problem because I have plenty of traffic enough to trigger the wp-cron

  • Adam Czajczyk

    Hey @s@sebascar,

    I hope you're well today!

    1. I want my customers to have full access to the course even after they finish to pay
    the 3 installments. Can I override this somehow?

    From what I understand from your second question, the access to the course is setup to permit user to view one part of it for a day after one payment, is it so? I think you could setup four memberships, let's name them: A, B, C and D. Memberships A, B, C and D would be giving an access to the 1st, 2nd and 3rd part of the course. You can setup them as "Finite". In a "Payment settings for A" membership choose "Change to B", for "B" choose "Change to C" and for "C" choose "Change to D" where "D" is a membership that allows user to see an entire course.

    As for stripe payment the settings I proposed above will probably change the way the payments are setup: instead of recurring payment you'll only need to setup a single payment for each of the three memberships (A, B, C and D).

    I hope that helps. In case of any further questions, please ask - I'll be glad to help!

    Cheers,
    Adam

  • sebascar

    Thanks. :slight_smile:

    It works like this.

    My course has 8 protected pages.

    To access those pages a customer can pay a full amount of 800 eur (one time payment) or 3 monthly installments of 267 eur. He can choose.

    In BOTH cases the will have the access to a new page every then 10 days. Which means: page 1 available instantly. Page 2 available 10 days after, page 3 after 20 and so on...

    In Both cases the user will have full lifetime access.*

    *If a user choose the 3 installment option and fails to pay one of the installment, access should be denied until he pays. Once he pays 3 installment he can have a lifetime access as well.

    Is it possibile? can I override this behaviors in my functions.php using your hooks?

    Thanks
    Bye

  • sebascar

    PS: stripe sent me this email

    It looks like we've had a bit of trouble delivering webhooks to your test webhook handler running at http://www.vocalcoachitalia.it/cms/?optimizemember_pro_stripe_notify=1. Since 2015-03-20 00:44:49 +0000, at least 447 of the times we've attempted to deliver a webhook have failed, and none have succeeded. Looking at the most recent failure, we received an HTTP status code of 404 from your webhook URL. However, our webhook systems only treats a webhook as successful if we get back a status code between 200 and 299.

    That's right http://www.vocalcoachitalia.it/cms/?optimizemember_pro_stripe_notify=1 returns a 404. I have my wp file installed in /cms/ but the Website Url is the root.

  • Jude

    Hi there @sebascar

    Is it possibile? can I override this behaviors in my functions.php using your hooks?

    This is possible you'll need to hook to the payment failed / cancelled callback from whichever gateway you are using and call one of these methods depending on which course you want to withdraw him from.

    $student-> withdraw_from_all_courses() ;
           $student->withdraw_from_course( $course_id,  true ) ;

    Then either manually or via a success hook from the gateway you can call this method to enable course access again

    $student->enroll_in_course( $course_id, $class_data );

    Im not sure what exactly you are doing with a webhook to that url. MarketPress creates one this way

    $this->ipn_url = home_url($mp->get_setting('slugs->store') . '/payment-return/' . $this->plugin_name);

    Can you give me some more details on the errors you get on subsequent payments / failed transactions

    Cheers
    Jude

  • Jude

    Hi there @sebascar

    Is it possibile? can I override this behaviors in my functions.php using your hooks?

    This is possible you'll need to hook to the payment failed / cancelled callback from whichever gateway you are using and call one of these methods depending on which course you want to withdraw him from.

    $student-> withdraw_from_all_courses() ;
           $student->withdraw_from_course( $course_id,  true ) ;

    Then either manually or via a success hook from the gateway you can call this method to enable course access again

    $student->enroll_in_course( $course_id, $class_data );

    Im not sure what exactly you are doing with a webhook to that url. MarketPress creates one this way

    $this->ipn_url = home_url($mp->get_setting('slugs->store') . '/payment-return/' . $this->plugin_name);

    Can you give me some more details on the errors you get on subsequent payments / failed transactions

    Cheers
    Jude

  • Jude

    Hi there @sebascar

    Sorry that didn't make sense, what you're looking at requires you to tinker with the plugin and modify its behaviour a bit ( Does not work this way out of the box). If you're not adept at writing WP code you could consider getting a developer to do it for you.

    About the refund you'll need to get in touch with the Billing department. You can get in touch with them here.

    https://premium.wpmudev.org/contact/

    Make sure you select Billing in the dropdown. Hate to lose you :slight_frown:

    Cheers
    Jude

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.