Note: You are currently viewing documentation for Moodle 4.0. Up-to-date documentation for the latest stable version of Moodle may be available here: Enrolment plugins.

Development:Enrolment plugins: Difference between revisions

From MoodleDocs
Line 1: Line 1:
{{stub}}
{{stub}}
==Testing paypal using the paypal developer sandbox  (for moodle 1.6)==
==Testing paypal using the paypal developer sandbox  (for moodle 1.6)==
If you follow these steps, you can test paypal payments using the paypal developer sandbox instead of the real paypal site.  No money is actually charged to any account.  All other actions are the same as if you were using the real paypal site.
* create a paypal developer account at https://developer.paypal.com/cgi-bin/devscr?cmd=_home
* create a paypal developer account at https://developer.paypal.com/cgi-bin/devscr?cmd=_home
* change the address being used to send data to paypal to use the sandbox. in enrol/paypal/enrol.html:
* change the address being used to send data to paypal to use the sandbox. in enrol/paypal/enrol.html:

Revision as of 15:21, 12 September 2006

Testing paypal using the paypal developer sandbox (for moodle 1.6)

If you follow these steps, you can test paypal payments using the paypal developer sandbox instead of the real paypal site. No money is actually charged to any account. All other actions are the same as if you were using the real paypal site.

  • create a paypal developer account at https://developer.paypal.com/cgi-bin/devscr?cmd=_home
  • change the address being used to send data to paypal to use the sandbox. in enrol/paypal/enrol.html:
  • change the address that is used to check the acknowledgment from paypal. in enrol/paypal/ipn.php, change:
    • $fp = fsockopen ('www.paypal.com', 80, $errno, $errstr, 30);
  • to
    • $fp = fsockopen ('www.sandbox.paypal.com', 80, $errno, $errstr, 30);
  • create a couple of user accounts in the paypal sandbox and test enrolling in a course that requires payment (note that you need to be logged into the paypal sandbox while doing this testing)

See also