Payments and scheduling in Appointments+

Greetings!

Hope you're doing fine today!

I have four questions about Appointments+ to which I did not found an answer so far:

1) When costumers are required to pay to book for a service, what happens to payment if costumers are allowed to cancel the schedule and one actually cancels it? Does Appointments+ Paypal API detects that and automatically cancel the payment or must I go into my Paypal account and cancel/refund it manually?

2) I'm running a multisite installation and my clients will each have a calendar of their own in their own subdirectories (actually a new Wordpress site in the network). I will charge whenever *their* customers book a schedule, and that is easy via frontend. However, if my clients book their costumers via the backend, i'll not be able to charge. Is there any workaround to charge scheduling directly in the backend as well (asking my clients to book their costumers via frontend would be unprofessional to say the least)? Or is there a way I can mass check if the action of scheduling was done from backend, so that I can audit this specific issue?

3) Can I set the return path ("thank you" URL) from each subdirectory to an URL from the main website/domain?

4) Since i'll be running multiple schedule sites, is there a way to create different invoice prefixes to each site? This would prevent the rare issue when two invoices with same prefix/number are generated and Paypal would detect one of them as paid and one of the customers would not be able to book a service - like explained here: http://www.barrykooij.com/the-danger-of-paypal-account/. Or maybe you've already made it so that invoices are unique. Please advise.

Strange questions indeed, but your help is most appreciated!

Thanks

  • Jude

    Hi there lfungarelli

    Hope all is well with you and you are having a great week !

    1) When costumers are required to pay to book for a service, what happens to payment if costumers are allowed to cancel the schedule and one actually cancels it? Does Appointments+ Paypal API detects that and automatically cancel the payment or must I go into my Paypal account and cancel/refund it manually?

    Nope, the API only notifies the calendar at the moment. The refund in PayPal itself must be done manually. This is by design partly because unlike products, service providers may not like or permit their appointments to be cancelled once booked without forfeiting the booking charge.

    2) I'm running a multisite installation and my clients will each have a calendar of their own in their own subdirectories (actually a new Wordpress site in the network). I will charge whenever *their* customers book a schedule, and that is easy via frontend. However, if my clients book their costumers via the backend, i'll not be able to charge. Is there any workaround to charge scheduling directly in the backend as well (asking my clients to book their costumers via frontend would be unprofessional to say the least)? Or is there a way I can mass check if the action of scheduling was done from backend, so that I can audit this specific issue?

    This is not currently possible out of the box because of the way the plugin is built. The primary focus was to allow a service provider book via the backend and not for aggregators as is the case here. That said I am marking a feature request on this and we can consider it depending on how many other members request something similar.

    Alternately you can try our Jobs Board where you can have it custom developed by professional developers

    https://premium.wpmudev.org/wordpress-development/

    3) Can I set the return path ("thank you" URL) from each subdirectory to an URL from the main website/domain?

    return

    Once again you need a bit of custom code to do this. We can set this path with a tiny snippet of code using this filter

    $return = apply_filters( 'app_paypal_return', $return );

    If you tell me the path I can write a snippet to quickly do this for you.

    Thank you for being a WPMU DEV member and have a fantastic day !

    Cheers
    Jude

  • lfungarelli

    Hello Jude, hope you're good today!

    Thanks for the answers!

    There was another topic that I asked which you may not have seen because I edited the post:

    4) Since i'll be running multiple schedule sites, is there a way to create different invoice prefixes to each site? This would prevent the rare issue when two invoices with same prefix/number are generated and Paypal would detect one of them as paid and one of the customers would not be able to book a service - like explained here: http://www.barrykooij.com/the-danger-of-paypal-account/. Or maybe you've already made it so that invoices are unique. Please advise.

    Thanks

  • Panos

    Hi lfungarelli ,

    The Appointments + plugin doesn't send an invoice id to paypal, so there is no such risk. Appointments+ uses other parameters for ipn which don't require an invoice id.

    The "invoice" parameter is an optional Pass-through variable you can use to identify your invoice number for this purchase. parameter, which could be responsible for such an issue.

    Since Appontments+ doesn't use it, you won't run into this problem.

    Some additional information, just in case you are doing any custom work and think you need the invoice parameter, you can use the following snippet to insert a unique invoice id using the blog id:

    add_filter( 'app_paypal_additional_fields', function( $form, $location, $service, $worker){
    
    	if( ! is_multisite() ) return $form;
    
    	$blog_id = get_current_blog_id();
    	$invoice_id = $blog_id . '-' . $service . '-' . current_time( 'timestamp' );
    
    	ob_start();
    	?>
    	<input type="hidden" name="invoice" value="<?php echo $invoice_id; ?>" />
    	<?php
    	$invoice_row = ob_get_clean();
    
    	return $form . $invoice_row;
    
    }, 10, 4 );

    Once again, if you are using the plugin as it is, the above should not be used.

    Hope this helps clarify on this matter :slight_smile:

    Kind regards,
    Panos

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.