Ejegg has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363353 )
Change subject: Fix Adyen test data generation ...................................................................... Fix Adyen test data generation Need to consume pending messages to db, and there was a typo in the capture notification generation. Also, create pending messages in the new, more-like-json format Change-Id: If9961d56dd779ecfd42f53288dd161fb977eef16 --- M PaymentProviders/Adyen/Tests/faker/README M PaymentProviders/Adyen/Tests/faker/faker.py M PaymentProviders/Adyen/Tests/faker/templates/pending.json 3 files changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig refs/changes/53/363353/1 diff --git a/PaymentProviders/Adyen/Tests/faker/README b/PaymentProviders/Adyen/Tests/faker/README index f62c9d6..d5371fa 100644 --- a/PaymentProviders/Adyen/Tests/faker/README +++ b/PaymentProviders/Adyen/Tests/faker/README @@ -15,6 +15,9 @@ ~/src/SmashPig$ php Maintenance/PopulateQueueFromDump.php --queue pending adyen-12345-pending.json +And move them from the pending queue to the pending table in your smashpig db. +~/src/SmashPig$ php Maintenance/ConsumePendingQueue.php + Then use the soap injector to simulate some IPN messages for the authorizations: ~/src/SmashPig/Tests/SoapInjector$ ./soapinject.py localhost '/ipn/smashpig_http_handler.php?p=adyen/listener' ../../adyen-12345-auths.xml diff --git a/PaymentProviders/Adyen/Tests/faker/faker.py b/PaymentProviders/Adyen/Tests/faker/faker.py index 207e128..46b6a19 100755 --- a/PaymentProviders/Adyen/Tests/faker/faker.py +++ b/PaymentProviders/Adyen/Tests/faker/faker.py @@ -38,7 +38,7 @@ header = 'adyen-' + oid pqueue += pending.replace('[[CTID]]', ctid).replace('[[ORDERID]]', oid) auths += auth.replace('[[ORDERID]]', oid).replace('[[AUTHID]]', authid) - captures += captures.replace('[[ORDERID]]', oid).replace('[[AUTHID]]', authid).replace('[[CAPTUREID]]', captureid) + captures += capture.replace('[[ORDERID]]', oid).replace('[[AUTHID]]', authid).replace('[[CAPTUREID]]', captureid) with open(fileprefix + '-auths.xml', 'w') as myfile: myfile.write( ipnContainer.replace('[[ITEMS]]', auths )) diff --git a/PaymentProviders/Adyen/Tests/faker/templates/pending.json b/PaymentProviders/Adyen/Tests/faker/templates/pending.json index fce8917..e3f3bb8 100644 --- a/PaymentProviders/Adyen/Tests/faker/templates/pending.json +++ b/PaymentProviders/Adyen/Tests/faker/templates/pending.json @@ -1 +1 @@ -raw={"headers":{"expires":"0","source_host":"lakitu","source_enqueued_time":"1458060070","destination":"\/queue\/pending","php-message-class":"SmashPig\\CrmLink\\Messages\\DonationInterfaceMessage","source_type":"payments","priority":"4","source_version":"unknown","source_run_id":"2027","message-id":"ID:lakitu-33375-[[AUTHID]]-2:5:-1:1:1","persistent":"true","source_name":"DonationInterface","gateway":"adyen","timestamp":"1458060070309"},"body":"{\"contribution_tracking_id\":\"[[CTID]]\",\"country\":\"US\",\"order_id\":\"[[ORDERID]]\",\"date\":1458060070,\"email\":\"test[[CTID]]@example.com\",\"fee\":\"0\",\"gateway_account\":\"WikimediaCOM\",\"gateway\":\"adyen\",\"gateway_txn_id\":false,\"language\":\"en\",\"payment_method\":\"cc\",\"payment_submethod\":\"visa\",\"response\":false,\"user_ip\":\"127.0.0.1\",\"utm_source\":\"..cc\",\"city\":\"Columbus\",\"currency\":\"USD\",\"first_name\":\"Testy[[CTID]]\",\"gross\":\"10.00\",\"last_name\":\"Testerson[[CTID]]\",\"recurring\":\"\",\"risk_score\":10,\"state_province\":\"OH\",\"street_address\":\"123 Fake St\",\"utm_campaign\":\"\",\"utm_medium\":\"\",\"postal_code\":\"12345\"}"} +{"source_host":"lakitu","source_enqueued_time":"1458060070","source_type":"payments","source_version":"unknown","source_run_id":"2027","source_name":"DonationInterface","contribution_tracking_id":"[[CTID]]","country":"US","order_id":"[[ORDERID]]","date":1458060070,"email":"test[[CTID]]@example.com","fee":"0","gateway_account":"WikimediaCOM","gateway":"adyen","gateway_txn_id":false,"language":"en","payment_method":"cc","payment_submethod":"visa","response":false,"user_ip":"127.0.0.1","utm_source":"..cc","city":"Columbus","currency":"USD","first_name":"Testy[[CTID]]","gross":"10.00","last_name":"Testerson[[CTID]]","recurring":"","risk_score":10,"state_province":"OH","street_address":"123 Fake St","utm_campaign":"","utm_medium":"","postal_code":"12345"} -- To view, visit https://gerrit.wikimedia.org/r/363353 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If9961d56dd779ecfd42f53288dd161fb977eef16 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/SmashPig Gerrit-Branch: master Gerrit-Owner: Ejegg <ej...@ejegg.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits