Skip to content

Fix issue charging disabled / deleted user #1993

Ben requested to merge fix/deleted-user-charge-1993 into master

Closes #1993

Testing

I'll use the account testacc for testing - a subscription is already set up and can be checked manually and reset back to an active state after failing with the following:

First enter the Cassandra pod

kubectl exec -it cassandra-0 cqlsh

Then to check the subscription, run:

select * from minds.subscriptions where plan_id='wire' and payment_method='tokens' and entity_guid=991463054707265537 and user_guid=1003026063363674113;

To set the state back to active after running the (further down) cli job, run

UPDATE minds.subscriptions SET status='active' where plan_id='wire' and payment_method='tokens' and entity_guid=991463054707265537 and user_guid=1003026063363674113 and subscription_id='urn:subscription:offchain-1003026063363674113-991463054707265537';

Now:

  1. Enter the pod using kubectl, and from the engine dir, run php cli.php payments subscriptions run.
  2. See no error output
  3. Reset the state using the above CQL UPDATE command.
  4. Login as sandbox admin.
  5. Ban testacc.
  6. Re-run the payments subscriptions CLI and see the error message that payment failed because the user is banned.
Edited by Ben

Merge request reports