Index: trunk/extensions/DonationInterface/payflowpro_gateway/stompPFPPendingProcessor.php |
— | — | @@ -2,8 +2,15 @@ |
3 | 3 | /** |
4 | 4 | * Processes pending PayflowPro transactions in a queueing service using Stomp |
5 | 5 | * |
6 | | - * Uses the MediaWiki maintenance system for command line execution. Requires MW > 1.16 |
| 6 | + * Uses the MediaWiki maintenance system for command line execution. Requires, at the |
| 7 | + * very least, the Maintenance.php file found in Mediawiki > 1.16. If you are running |
| 8 | + * MW < 1.16, you can grab a copy of Maintenance.php and place it somewhere accessible |
| 9 | + * and run this script with: |
| 10 | + * php stompPFPPendingProcessor.php -m "/path/to/Maintenance.php" |
7 | 11 | * |
| 12 | + * Also note all the other config options that can be passed in via the CLI arguments |
| 13 | + * below. |
| 14 | + * |
8 | 15 | * This was built to verify pending PayflowPro transactions in an ActiveMQ queue system. |
9 | 16 | * It pulls a transaction out of a 'pending' queue and submits the message to PayflowPro |
10 | 17 | * for verification. If PayflowPro verifies the transaction, it is then passed off to a |
— | — | @@ -32,8 +39,13 @@ |
33 | 40 | * |
34 | 41 | * @author: Arthur Richards <arichards@wikimedia.org> |
35 | 42 | */ |
36 | | -require_once( dirname(__FILE__) . "/../../../maintenance/Maintenance.php" ); |
37 | 43 | |
| 44 | +// add optional Maintenance.php argument for cli (useful for systems < 1.16) |
| 45 | +$opts = getopt( "m:" ); |
| 46 | +// if the path is not specified from CLI, default Maintenance.php path |
| 47 | +$maint = ( $opts['m'] ) ? $opts['m'] : dirname(__FILE__) . "/../.././maintenance/Maintenance.php"; |
| 48 | +require_once( $maint ); |
| 49 | + |
38 | 50 | // load necessary stomp files from DonationInterface/active_mq |
39 | 51 | //require_once( dirname( __FILE__ ) . "/../extensions/DonationInterface/activemq_stomp/Stomp.php" ); |
40 | 52 | require_once('/var/www/sites/all/modules/queue2civicrm/Stomp.php'); // why are these Stomps different?! |