Clean up test payment transaction from drupal commerce site I am trying to find an admin page where I can delete all test payment transactions happened on drupal commerce, but could not find it.Need to no if my following plan will create any referential integrity issue after cleanup.

From orders page clean all test orders.

Manually clean the database tables 'commerce_payment_transaction' and 'commerce_payment_transaction_revision' and then using db API clean payment transaction table using
db_truncate('commerce_payment_transaction');
db_truncate('commerce_payment_transaction_revision');

Clean up all tested customer profiles from admin page for the same using bulk operation.

Clean up test users created with the checkout process.

Truncate orders table to start with order id , using again following code.


db_truncate('commerce_order');
db_truncate('commerce_order_revision');
The short answer is there is no such page. What you're attempting to build with VBO should work well, but currently there is no automatic deletion of payment transactions when orders are deleted. It's questionable whether or not we actually want that to be the default behavior. However, if you're just using VBO driven by custom rules components, you should be able to load any payment transaction referencing the order to be deleted and delete them from within the same rule. Using commerce_order_delete() will not delete payment transactions; for that you'd need commerce_payment_transaction_delete().