Action: mt_successful_payment

do_action( 'mt_successful_payment', $purchase_id, $response, $data, $post )

Take action when a payment is completed successfully.

Parameters:
Name Type Description
$purchase_id int

Payment ID.

$response string

Response confirmation from gateway.

$data array

Data sent from gateway.

$post array

Posted data from gateway.

Source: