Fix $0 amount affiliate push notification minds#4238
Ticket(s) / Related Merge Requests
Summary of Changes
Fix the affiliate push notifications coming through with a $0 amount. As agreed with @markharding, we are NOT fixing the fact two notifications can be sent if a user has earned both referrer affiliate and general affiliate earnings.
Testing Considerations
Run the below query changing 1286984596277170190
to your user GUID you want to be the notification recipient, and 1547979163913162766
to a unique guid (change a couple of numbers). You may need to change the dates to within the last 24 hours of testing.
INSERT INTO `minds`.`minds_payments` INSERT INTO `minds`.`minds_payments` (`payment_guid`,`user_guid`,`affiliate_user_guid`,`affiliate_type`,`payment_type`,`payment_status`,`payment_method`,`payment_amount_millis`,`refunded_amount_millis`,`is_captured`,`payment_tx_id`,`created_timestamp`,`updated_timestamp`) VALUES (1547979163913162766,1003026063363674113,991463054707265537,2,1,2,1,300000,NULL,1,'pi_1234567890','2023-09-21 11:36:32','2023-09-20 11:36:32');
Then exec into the engine pod and run
source /vault/secrets/env && php cli.php PartnerEarnings sync
Your user should receive a single notification containing a dollar amount earned - there should be no notification for 0 dollars.
Deployment Considerations
Standard deployment.
Regression Scope
Affiliate push notifications being sent.
Platform Affected (web, mobile, etc)
Web
Developer Testing Completed
Manual, unit (phpspec).
Screenshots / Screen Recording
simplescreenrecorder-2023-09-20_19.20.29
Does this impact
-
Localization -
Dark/light mode -
Guest mode
Definition of Done Checklist
-
The Acceptance Criteria has been met -
Code is tested: Testing includes unit/spec, E2E/automated and manual testing -
Merge requests description has been filled out