Skip to content

Instantly share code, notes, and snippets.

@vanbo
Created November 13, 2018 13:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vanbo/a38dd44a21ea5b1ceb7703374882f026 to your computer and use it in GitHub Desktop.
Save vanbo/a38dd44a21ea5b1ceb7703374882f026 to your computer and use it in GitHub Desktop.
Borica fire a hook after Borica Payment Response(IPN)
/**
* @param WC_Order $order
* @param string $response_code The transaction response code. Possible values are:
* 00 - Successful transaction
* 85 - Reversal Transaction already registered
* 86 - Transaction already registered
* 87 - Wrong protocol version
* 88 - BOReq parameter is not given
* 89 - Original transaction is not found.
* 90 - Card is not registered in the Directory Server
* 91 - Transaction timeout
* 92 - Status check: Wrong eBorica format
* 93 - Unsuccessful 3D authentication
* 94 - Cancelled transaction
* 95 - Invalid merchant signature
* 96 - Technical transaction error
* 97 - Declined on fraud grounds
* 98 - Status check: no borica request registered
* 99 - Declined by TPSS
*/
function prefix_after_payment_response( $order, $response_code ) {
if ( '00' == $response_code ) {
// Action when the transaction is successful
}
}
add_action( 'wc_borica_payment_response_processed', 'prefix_after_payment_response', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment