added payment problem message
This commit is contained in:
@@ -4,7 +4,7 @@ Plugin Name: hggg_cipf
|
||||
Plugin URI:
|
||||
Description:
|
||||
Author: hugogogo
|
||||
Version: 0.5.3
|
||||
Version: 0.5.4
|
||||
Author URI:
|
||||
*/
|
||||
|
||||
@@ -180,6 +180,16 @@ contactez la fipf directement",
|
||||
'confirmation_subject'=>"[CIPF - paiement echoué]",
|
||||
'confirmation_message'=>"votre paiement a echoué",
|
||||
],
|
||||
'payment_problem'=>[
|
||||
'name'=>'prof - le paiement a rencontré un problem',
|
||||
'notification_send'=>true,
|
||||
'notification_to'=>'$$__admin_email__$$',
|
||||
'notification_subject'=>"[CIPF /prof - paiement probleme]",
|
||||
'notification_message'=>'probleme de paiement pour $$user_login$$ : $$__author_page_url__$$',
|
||||
'confirmation_send'=>false,
|
||||
'confirmation_subject'=>"[CIPF - paiement problème]",
|
||||
'confirmation_message'=>"votre paiement a rencontré un probleme",
|
||||
],
|
||||
'transfert_success'=>[
|
||||
'name'=>'prof - le virement a été validé',
|
||||
'notification_send'=>true,
|
||||
|
||||
@@ -43,10 +43,12 @@ function handle_orders_capture_request_CIPF($request) {
|
||||
catch (HttpException $error) {
|
||||
$status_code = $error->getStatusCode();
|
||||
$message = array('ERROR_TREATMENT'=>true, 'message'=>'Failed to handle order after capture in server: ' . $error->getMessage());
|
||||
send_emails_CIPF('payment_problem');
|
||||
return new WP_REST_Response($message, $status_code);
|
||||
}
|
||||
catch (Exception $error) {
|
||||
$message = array('ERROR_TREATMENT'=>true, 'message'=>'Failed to handle order after capture in server: ' . $error->getMessage());
|
||||
send_emails_CIPF('payment_problem');
|
||||
return new WP_REST_Response($message, 500);
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ if (!defined('ABSPATH')) {
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
@@ -180,7 +181,6 @@ function success_payment_for_user_CIPF($user_id, $order_id) {
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* @return mixed num - user_id
|
||||
* bool false - if no match found
|
||||
|
||||
Reference in New Issue
Block a user