Paypal Integration on Custom DocType

Hi,

How can I call paypal api from my custom doctype?

Thanks.

Custom doctypes don’t have a py file so you wont be able to write any code.
You will have to move the doctype to a custom app.
Can you elaborate your use case ?

Oh sorry. Should be Doctype on a Custom App.

Make your doctype in a custom app and write the code in the py file that will be generated. Hope this solves your issue.

I already have a doctype in a custom app. The doctype has fields for Name and Amount. I don’t have ERPNext installed. It’s a standalone app on Frappe. I just want to create paypal payment from details I have on Doctype.

Hi Jeff! have a look here https://github.com/frappe/frappe/blob/develop/frappe/integrations/doctype/paypal_settings/paypal_settings.py

Thanks John,

I will look into this.

Bests,

Jeff