PayPal & MySQL - PayPal Confirmation?...

User 2610782 Photo


Registered User
5 posts

Eric, I'm late to the IPN party, but by reading over checkoutpps.cls.php, which CC created for their Shopping Cart Creator, I have been able to pass the notify_URL as a nvp because it can be hard-coded into this page. This has allowed me to get the payment notification from PP which I handle with a listener script.

The issue, as noted by Antar, is that it is necessary to also pass a custom field that will carry the _transactionid_ which would also be returned to the listener script. This is needed to really confirm that the payment has been made. It looks like this actually works with Shopping Cart Creator, but it appears that CC has unset the $_Session variable that would be needed in WFB.

I'd rather pass the custom value in the button code on checkoutpps.cls.php than reinvent what would appear to be a straightforward fix - which I can't seem to work out. Do you know of or could you suggest a workaround.

Thanks,
Steve
User 187934 Photo


Senior Advisor
20,190 posts

Give this one a try.
http://www.coffeecup.com/forums/designe … post245761
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2610782 Photo


Registered User
5 posts

Eric,

Thanks for the example ipn listener file, but I do not see where/how the need to pass a custom value that is already associated with the original form submission is accounted for. Perhaps I'm missing something.

Thanks,
Steve
User 187934 Photo


Senior Advisor
20,190 posts

I haven't tried getting the shop to use an IPN yet. It was only a start from example to save time.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 345797 Photo


Registered User
48 posts

I have an IPN script which works find when using the IPN simulator. I don't know where I can add the code to pass the custom value, a database ID field in my web form builder form, to Paypal so that it will send it back to my listener script and I can update the DB with the fact the user has paid.

When I run the test using the sandbox, the listener script runs but the value of the custom field is the transaction ID from paypal. I tried to hard core a custom hidden field in function AddHeaderToMessage in the checkoutpps.cls.php file - . '<input type="hidden" name="custom" value="2" />' But that doesn't seem to work.
User 345797 Photo


Registered User
48 posts

I found that the hidden key custom is referred to further down in the script but have no idea what it is used for.

if( isset( $_SESSION[ORDERREFKEY] ) ) {
$fields .= '<input type="hidden" name="custom" value="' . urlencode( strtoupper( $_SESSION[ORDERREFKEY] ) ) . '" />';

Can someone explain it to me? Can I not use it for my own custom value? something line
if( isset( $_SESSION[mycustom] ) ) {
$fields .= '<input type="hidden" name="custom" value="' . urlencode( $_SESSION[mycustom] ) . '" />';
User 345797 Photo


Registered User
48 posts

Hi,
I can't for the life of me remember how the pay pal confirmation fields are created in the mysql database. The form data is written successfully to the DB and the payment is made. The IPN php script is run but it fails when it tries to update the payment confirmation information in the mysql table. I looked at the table and the two fields that I want updated don't appear there, Payment and PPTransactionID. When I did this last year I don't remember having to create these two fields. I thought cc handled it. When I added them, the update worked.

Shouldn't FB handled this if you have said that you want paypal for payment AND you are storing the data in mysql?

Any thoughts.
User 187934 Photo


Senior Advisor
20,190 posts

Hi Janice, a custom IPN has nothing to do with the form builder. That would be done outside the formbuilder and you would need to make sure your script is working correctly.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 345797 Photo


Registered User
48 posts

I realise it is outside of the form builder. It's just that my documentation from last year didn't mention adding the two fields. I guess I just missed it. Will have to make sure that I I add it to my documentation for next year.

Thanks Eric.
User 187934 Photo


Senior Advisor
20,190 posts

Those might have been added in the last update. I know it always adds the _flags_ and _transactid_ to tables even when their not being used.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.