Form + Paypal payment creation & 3rd party API email trigger help?

I am trying to configure a form with PayPal payment that collects data, then triggers an email response from a 3rd party api.

I have created the dataset with linked form but can’t add the PayPal method to complete the transaction.

I have also added the code from the 3rd party tot he backend via export but feel this may need to be done via fetch?

Basically I am struggling to make this work and would hugely appreciate some help with it.

Again, upon the form being completed, payment made the email containing the product needs to be sent via the api code I have from the 3rd party.

Thanks in advance, Michael.