Skip to main content
formatted the query so it can be read without scrolling
Source Link

I believe, by transaction_email you meant customer email and by transaction status you meant a way to identify whether order was placed successfully or not.

Customer email is present in sales_order table.

Generally when you click the "Place Order" button, order status is pending and when you make the payment successfully, order status changes to processing. You can get order status from sales_order table.

Here is the sql query for the same:

SELECT spt.order_id, 
    spt.transaction_id,
    spt.txn_id,
    so.customer_email,
    so.status from
FROM sales_payment_transaction as spt join
JOIN sales_order as so onON spt.order_id = so.entity_id;entity_id

I believe, by transaction_email you meant customer email and by transaction status you meant a way to identify whether order was placed successfully or not.

Customer email is present in sales_order table.

Generally when you click the "Place Order" button, order status is pending and when you make the payment successfully, order status changes to processing. You can get order status from sales_order table.

Here is the sql query for the same:

SELECT spt.order_id, spt.transaction_id, spt.txn_id, so.customer_email, so.status from sales_payment_transaction as spt join sales_order as so on spt.order_id = so.entity_id;

I believe, by transaction_email you meant customer email and by transaction status you meant a way to identify whether order was placed successfully or not.

Customer email is present in sales_order table.

Generally when you click the "Place Order" button, order status is pending and when you make the payment successfully, order status changes to processing. You can get order status from sales_order table.

Here is the sql query for the same:

SELECT spt.order_id, 
    spt.transaction_id,
    spt.txn_id,
    so.customer_email,
    so.status
FROM sales_payment_transaction spt 
JOIN sales_order so ON spt.order_id = so.entity_id
Source Link
amitshree
  • 7.1k
  • 12
  • 64
  • 120

I believe, by transaction_email you meant customer email and by transaction status you meant a way to identify whether order was placed successfully or not.

Customer email is present in sales_order table.

Generally when you click the "Place Order" button, order status is pending and when you make the payment successfully, order status changes to processing. You can get order status from sales_order table.

Here is the sql query for the same:

SELECT spt.order_id, spt.transaction_id, spt.txn_id, so.customer_email, so.status from sales_payment_transaction as spt join sales_order as so on spt.order_id = so.entity_id;