The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Integrating with PayPal
#4
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!
  Reply


Messages In This Thread
Integrating with PayPal - by gathr - 01-14-2017, 04:50 PM
Integrating with PayPal - by gathr - 01-15-2017, 02:00 AM
Integrating with PayPal - by mudmin - 01-15-2017, 02:38 PM
Integrating with PayPal - by gathr - 01-17-2017, 09:43 AM
Integrating with PayPal - by mudmin - 01-17-2017, 02:23 PM
Integrating with PayPal - by gathr - 02-02-2017, 10:13 AM
Integrating with PayPal - by gathr - 02-08-2017, 12:22 AM
Integrating with PayPal - by mudmin - 02-14-2017, 02:22 PM
Integrating with PayPal - by gathr - 02-14-2017, 10:16 PM
Integrating with PayPal - by radke - 10-10-2017, 11:24 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)