Forums

IPN - Data Read - Data Save Field

U Can Drive 24 Sep, 2018
I'm building a payment form using PayPal Redirect.
I've build a form specifically for the IPN which obviously does not have a "Display Section".

I'm reading the relevant forms but don't know how to move the data from {var:read_data3.Data.Info} to the standard {data.Info} for saving without using a "Display Section" with it all set up.

I'm assuming there will be a simple PHP code to do this, I've tried doing it using:
$this->data['Paid'] = {var:read_data4.Data.Paid}+{var:read_data3.Data.Purchase};

{var:read_data4.Data.Paid} being the value read from the students file.
{var:read_data3.Data.Purchase} being the value read from the purchase file.
['Paid'] being the value to replace the Paid field in the students file upon Save.

The ['Paid'] remains in a place of none existance.
healyhatman 25 Sep, 2018
Can't use shortcodes in PHP. Check the shortcodes FAQ for the relevant syntax.
U Can Drive 30 Oct, 2018
Sorry, just can't get my head around this.

Could you show me the correct PHP code to use to accomplish the above?

Thank you
healyhatman 30 Oct, 2018
You don't need a whole new form for the IPN, just add an event for it to your existing form.
GreyHead 30 Oct, 2018
Hi UCanDRive,

There is a CFv4 FAQ here that outlines the method to use.

+ When the form submits add a unique id to the record, save the data including the id; and include the id in the data you send to PayPal.

+ As healyhatman says add the IPN as a new event in the same form (or a new form if you prefer). In that you can use the id returned by PayPal to identify the transaction and read the saved record (it might also be good to confirm the key details match). Once you have the confirmation that the payment is complete you can update the saved record.

Bob
This topic is locked and no more replies can be posted.