Creating Payments

This forum is for programmers who have questions about the source code.
Post Reply
User avatar
dcrider
Posts: 67
Joined: Sun Sep 29, 2019 11:03 am
Contact:

Creating Payments

Post by dcrider » Wed Feb 19, 2020 1:32 pm

We have a promotional tool that I built that calculates some discounts from various parameters. I'm looking for a way to create a payment based on the information generated by this tool. I can't seem to find an easy way to do this.

Some payments will be attached to payment plans and some will not; some will charge a credit card and some will not.

Do you have any recommendations on a way to create a payment (both on and not on a payment plan and both on and not on a credit card) without any further user input?

User avatar
cmcgehee
Posts: 711
Joined: Tue Aug 25, 2015 5:06 pm
Location: Salem, Oregon

Re: Creating Payments

Post by cmcgehee » Wed Feb 19, 2020 4:12 pm

It sounds like the best way to accomplish this would be to create a plugin. You can then call our methods to create payments.
https://opendental.com/manual/plugins.html
Chris McGehee
Open Dental Software
http://www.opendental.com

User avatar
dcrider
Posts: 67
Joined: Sun Sep 29, 2019 11:03 am
Contact:

Re: Creating Payments

Post by dcrider » Thu Feb 20, 2020 8:24 am

I'm already using a plugin. However, the methods that I think I want to use, are private and do not have hooks. I want to know if there is a recommended method/hook for creating payments, or if I need to request hooks to be added.

User avatar
cmcgehee
Posts: 711
Joined: Tue Aug 25, 2015 5:06 pm
Location: Salem, Oregon

Re: Creating Payments

Post by cmcgehee » Thu Feb 20, 2020 10:22 am

There isn't one particular method for creating a payment because each place in our program that makes a payment does something unique. You'll want to call OpenDentBusiness.Payments.Insert at the very least. For an example on what to pass to this method, you could look at OpenDentBusiness.RecurringChargerator.CreatePayment. You'll also need to insert at least one PaySplit.
Chris McGehee
Open Dental Software
http://www.opendental.com

User avatar
dcrider
Posts: 67
Joined: Sun Sep 29, 2019 11:03 am
Contact:

Re: Creating Payments

Post by dcrider » Thu Feb 20, 2020 10:46 am

I'll look into that, thank you.

Post Reply