CodeIgniter Forums
Paypal Registration Application - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Paypal Registration Application (/showthread.php?tid=11087)

Pages: 1 2


Paypal Registration Application - El Forum - 08-28-2008

[eluser]Jesse Schutt[/eluser]
Thanks for the thoughts!

If there is anyone that can speak to the overall logic/flow of this app, please jump in!


Paypal Registration Application - El Forum - 08-28-2008

[eluser]ontguy[/eluser]
You can use the custom field in your form and included the details necessary to identify the order/purchase.

controller
Code:
function form_gen ()
{
$custom_string = $order_id:$user_id;
$this->paypal_lib->add_field('custom', $custom_string); // <-- Verify return

$this->paypal_lib->add_field('return', site_url('checkout/success')); //you could use this to say the order is in progress
$this->paypal_lib->add_field('cancel_return', site_url('checkout/cancel')); //redirect to this url when cancel on the paypal "side"
$this->paypal_lib->add_field('notify_url', site_url('checkout/ipn')); // <-- IPN url
}

function ipn () {
list($user_id, $order_id) = explode(":", $this->paypal_lib->ipn_data['custom']);
then update the database record
etc



Paypal Registration Application - El Forum - 08-28-2008

[eluser]Jesse Schutt[/eluser]
Wow, this is very helpful! I will have to try it out and let you know if it works for me!