Fundraising tech/Queue testing

First steps for all
/vagrant$ redis-cli monitor | grep RPUSH /vagrant/srv/SmashPig$ php Maintenance/ConsumePendingQueue.php drush --user=1 -v -r /vagrant/srv/org.wikimedia.civicrm/drupal afqc drush --user=1 -v -r /vagrant/srv/org.wikimedia.civicrm/drupal piqc
 * CentralNotice banner or donatewiki (later)
 * watch for messages being pushed to redis:
 * submit donation form, which adds messages to pending queue
 * Works for Amazon as long as you are using https (vagrant roles enable https), returnURL is https://payments.wiki.local.wmftest.net:4430/w/index.php?title=Special:AmazonGateway and you are in test mode. Need to use test accounts from Amazon payments console
 * AstroPay: need VPN, and need to use credit card 'GNB', only enabled for BR when $wgAstroPayGatewayTest = true
 * Name: ASTROPAY TESTING
 * Cpf: 00003456789
 * Email: testing@astropaycard.com
 * Consume pending to db
 * consume antifraud and payments-init queue messages

Adyen
( To test Redis job queue, make data-store/jobs config look like data-store/pending-new, with queue name changed to 'jobs', and replace StompJobRunner.php below with QueueJobRunner.php ) /vagrant/srv/SmashPig$ php Maintenance/CreateIpnMessagesFromPendingDb.php adyen /vagrant/srv/SmashPig$ Tests/SoapInjector/soapinject.py payments-listener.local.wmftest.net '/smashpig_http_handler.php?p=adyen/listener' auth_success.10.1.xml /vagrant/srv/SmashPig$ php Maintenance/StompJobRunner.php --config-node adyen drush --user=1 -v -r /vagrant/srv/org.wikimedia.civicrm/drupal fqc /vagrant/srv/SmashPig/Tests$ ./soapinject.py payments-listener.local.wmftest.net '/smashpig_http_handler.php?p=adyen/listener' ../../adyen-12345-captures.xml /vagrant/srv/SmashPig$ php Maintenance/StompJobRunner.php --config-node adyen
 * Create fake IPN messages matching pending queue messages
 * Simulate auth IPN listener hits
 * run JobRunner to perform mock capture requests and send more antifraud queue messages
 * You can set your SmashPig.yaml to use a mock API endpoint to avoid hitting even the adyen test system, see PaymentProviders/Adyen/Tests/config_test_success.yaml
 * consume antifraud queue messages
 * Simulate capture IPN listener hits
 * run JobRunner to combine pending messages and send to completed queue

Amazon
/vagrant/srv/SmashPig$ php Maintenance/CreateIpnMessagesFromPendingDb.php amazon /vagrant/srv/SmashPig$ PaymentProviders/Amazon/Tests/inject.py payments-listener.local.wmftest.net '/smashpig_http_handler.php?p=amazon/listener' CaptureCompleted.7-0.json
 * Create fake IPN messages matching pending queue messages
 * Simulate capture completed IPN listener hit - listener will add completed queue message with indication to look in pending queue for missing details
 * Maybe need to create a MockIpnHandler

AstroPay
/vagrant/srv/SmashPig$ php Maintenance/CreateIpnMessagesFromPendingDb.php --config-node astropay astropay /vagrant/srv/SmashPig$ curl -d @success.37956.2.curl http://payments-listener.local.wmftest.net/smashpig_http_handler.php?p=astropay/listener
 * Create fake IPN messages matching pending queue messages
 * Simulate successful payment IPN listener hit - listener will add completed queue message with indication to look in pending queue for missing details

PayPal

 * Either mock the PP form, or immediately redirect back.  Probably something in-between, where we show diagnostics about the request and then a button to return successfully or cancel.

Last steps for all
drush --user=1 -v -r /vagrant/srv/org.wikimedia.civicrm/drupal qc drush --user=1 -v -r /vagrant/srv/org.wikimedia.civicrm/drupal rqc drush --user=1 -v -r /vagrant/srv/org.wikimedia.civicrm/drupal unsubqc drush eval --user=1 -v -r /vagrant/srv/org.wikimedia.civicrm/drupal 'drush_thank_you;'
 * Run donations queue consumer
 * Run recurring queue consumer
 * Run unsubscribe/optin queue consumer
 * Run TY mail sender (is vagrant configured to fake email safely?)