Support

Home Forums Event Espresso Premium Offline payment method auto approve and paid?

Offline payment method auto approve and paid?

Posted: July 28, 2017 at 11:43 am


hodyhong

July 28, 2017 at 11:43 am

I have asked to include the ticket URL in the confirmation page in previous post:
https://eventespresso.com/topic/ticket-link-at-thank-you-page-for-admin/#post-247561

Which has revealed one of the issue I have got with my current set up: I have tried setting up two offline payments for admin to use the frontend ticket purchasing. And currently it won’t work with snippet as the payment is incomplete and the registration is not approved.
My question is there way I can pre approve and auto pay for the registration when using those two offline payment methods purchasing from the frontend as an admin.

Thanks guys. you have been great!


Tony

  • Support Staff

July 28, 2017 at 3:01 pm

We don’t have any offline payment methods that will approve the registration without payment so to do that would basically require your own custom payment method which did approve the registration.

You could just change the snippet to show the link even if the registration is not approved…

Or if the ‘admin’ is logged in add another check to the conditional to always display the link based on a capability the admin would have, for example:

if ( $primary_reg->is_approved() || current_user_can('manage_options') ) {

You will also need to adjust the snippet to display tickets that are no approved when the link is clicked, to do that change:

'ee' => 'ee-txn-tickets-approved-url',

to

'ee' => 'ee-txn-tithat's-url',


hodyhong

July 29, 2017 at 7:33 am

Thanks Tony for the thoughtful recommendation. This works great on displaying the ticket URL. But I realise that without approving the registration, or completing the payment, the registration won’t get counted toward the available space. This means that the admin will still need to go to the backend and manually put the payment it.
I think I will need to custom build a payment method to do this. Is there any reference code I can have a look or area that I can have a look?

Thanks a lot.

Hody


Tony

  • Support Staff

July 31, 2017 at 4:51 am

We have some documentation on creating your own payment methods here:

https://eventespresso.com/2015/03/developers-guide-to-payment-methods-for-event-espresso-4-6/

You could also set the ‘Default Registration Status’ of the event to ‘Approved’ which will do everything you need, however, note that any registrations that are finalized will then be Approved regardless of the payment method they select.


hodyhong

July 31, 2017 at 11:24 am

This is fantastic. I managed to modify the skeleton add on example to created an payment method which will straight away approve the payment! Thanks so much Tony. This works.


Tony

  • Support Staff

July 31, 2017 at 3:11 pm

Great, I’m glad you found a working solution 🙂

The support post ‘Offline payment method auto approve and paid?’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso