01-17-2017, 09:43 AM
Thank you for very much for your reply. I haven't had an opportunity to implement your additions full yet. But I wanted to add a few things to my explanation.
There are two parts to the PayPal transaction. The first part (which is what I'm trying to achieve here) is to capture the user's information when they click the "buy now" button for example.
So after clicking the button, two things happen:
1) the user is taken to an external paypal checkout where the transaction is completed (user inputs card details or pays with paypal account)
2) Transaction information is captured in a separate table called transactions_paypal. The $hash = md5($payment->getID()) uses paypal's getId() method to grab an identifier of the payment being created which is then stored in a session (after being sent to paypal).
So the user_id (userspice), payment_id (paypal) and hash are stored in transacitons_paypal.
When the user completes the transaction at paypal they are redirected back to my site (another page like pay.php) where the payment_id is verified against the database and the then the rest of the action can take place (user becomes premium and is assigned an expiry period).
The other thing is that I for some reason just can't seem to require the init.php. From the error log:
[17-Jan-2017 10:40:28 UTC] PHP Warning: require_once(users/init.php): failed to open stream: No such file or directory in /home/hat3tank/public_html/users/paypal/checkout.php on line 3
[17-Jan-2017 10:40:28 UTC] PHP Fatal error: require_once(): Failed opening required 'users/init.php' (include_path='.:/opt/alt/php55/usr/share/pear:/opt/alt/php55/usr/share/php') in /home/hat3tank/public_html/users/paypal/checkout.php on line 3
Any tricks for finding file with a direct path?
Thanks for all your help with this. Apart from being an awesome product, the support is amazing. Well done!
There are two parts to the PayPal transaction. The first part (which is what I'm trying to achieve here) is to capture the user's information when they click the "buy now" button for example.
So after clicking the button, two things happen:
1) the user is taken to an external paypal checkout where the transaction is completed (user inputs card details or pays with paypal account)
2) Transaction information is captured in a separate table called transactions_paypal. The $hash = md5($payment->getID()) uses paypal's getId() method to grab an identifier of the payment being created which is then stored in a session (after being sent to paypal).
So the user_id (userspice), payment_id (paypal) and hash are stored in transacitons_paypal.
When the user completes the transaction at paypal they are redirected back to my site (another page like pay.php) where the payment_id is verified against the database and the then the rest of the action can take place (user becomes premium and is assigned an expiry period).
The other thing is that I for some reason just can't seem to require the init.php. From the error log:
[17-Jan-2017 10:40:28 UTC] PHP Warning: require_once(users/init.php): failed to open stream: No such file or directory in /home/hat3tank/public_html/users/paypal/checkout.php on line 3
[17-Jan-2017 10:40:28 UTC] PHP Fatal error: require_once(): Failed opening required 'users/init.php' (include_path='.:/opt/alt/php55/usr/share/pear:/opt/alt/php55/usr/share/php') in /home/hat3tank/public_html/users/paypal/checkout.php on line 3
Any tricks for finding file with a direct path?
Thanks for all your help with this. Apart from being an awesome product, the support is amazing. Well done!