Welcome Guest, Not a member yet? Register   Sign In
Questions about PayPal Library
#1

[eluser]CI Lee[/eluser]
Hello all,

I have integrated the paypal module into a site and it I have it working with the exception of a few things. Mainly it is passing the same data to the paypal form and I have no way to uniquely identify the payment with an order. So I wanted to pass some data to through the custom field.

Code:
$this->paypal_lib->add_field('custom', '1234567890'); // <-- Verify return

I was wondering if anyone had any ideas or examples of how to use this to generate unique data? I was thinking I would md5 the date of the form submission, enter that into the db and then pass that here to use as the custom data... but I could not get it to work.

Thanks for any and all help you can provide.

Lee
#2

[eluser]CI Lee[/eluser]
I have tried doing this
Code:
$this->paypal_lib->add_field('custom', $this->input->post('date_hash')); // <-- Verify return
and I figured that this would work as the data gets posted to the paypal controller... ???

But I am wrong, alas today has been that kind of day and my brain is broken.

Can someone point me in the right direction to get me back on my way. I have been using Ran's PayPal Lib and it is relatively untouched.

Thanks All,

Lee
#3

[eluser]Unknown[/eluser]
Go to line 155 in paypal_lib.php and replace this:
$this->ipn_data[$field] = $value;
with this:
$value = str_replace("\n", "\r\n", $value);
$this->ipn_data[$field] = $value;

This can help...

You should be able to access the custom field just like you would any $_POST variable.
One last thing, are you using IPN or are you checking PayPal's passback?




Theme © iAndrew 2016 - Forum software by © MyBB