Easy Digital Downloads is a complete e-commerce solution for selling digital products in a light, performant, and easy to use plugin. Rather that attempting to provide every feature under the sun, Easy Digital Downloads makes selling digital simple and complete by providing just the features you need.
The integration method integrates Easy Digital Downloads payment gateways directly.
Add a custom code to order form
Find and edit the file
Find function _edd_user_infofields() and add the following code right after </fieldset> tag:
Save your work.
Integrate PayPal module 1
To integrate PayPal module, you will have to take two steps. The first is to edit file
Find line with text saying
and change this exact text (not line!) to this:
'?edd-listener=IPN&pap_custom='.$_POST['pap_custom']; // Post Affiliate Pro integration snippet
If you cannot find the above mentioned line (probably you use a newer version of EasyDigitalDownloads plugin), then try to look up the following line:
'notify_url' => $listener_url,
and change it to this:
'notify_url' => $listener_url.'&pap_custom='.$_POST['pap_custom'],
Continue to the next step, we stay in the same file.
Integrate PayPal module 2
The second step of PayPal module integration is to add cURL code to IPN listener. Find function _edd_process_paypalipn() and add the following code right to the function beginning.
/* Post Affiliate Pro integration snippet */ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'http://URL_TO_PostAffiliatePro/plugins/PayPal/paypal.php?pap_custom='.$_GET['pap_custom']); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $_POST); curl_exec($ch); /* /Post Affiliate Pro integration snippet */
Save your work and you are done. The PayPal module has just been integrated.
The last step is to activate your PayPal plugin in your Post Affiliate Pro merchant panel.