You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$this->method_title = __( 'Lipa Na MPesa', 'woocommerce' );
207
-
$this->method_description = __( '<h4 style="color: red;">IMPORTANT!</h4><li>Please <a href="https://developer.safaricom.co.ke/" target="_blank" >create an app on Daraja</a> if you haven\'t. Fill in the app\'s consumer key and secret below.</li><li>For security purposes, and for the MPesa Instant Payment Notification to work, ensure your site is running over https(SSL).</li>'.$reg_notice.$test_cred );
207
+
$this->method_description = __( '<h4 style="color: red;">IMPORTANT!</h4><li>Please <a href="https://developer.safaricom.co.ke/" target="_blank" >create an app on Daraja</a> if you haven\'t. Fill in the app\'s consumer key and secret below.</li><li>For security purposes, and for the MPesa Instant Payment Notification to work, ensure your site is running over https(SSL).</li>'.$reg_notice.$test_cred ).'<li>Peter Njeru has a <a href="https://peternjeru.co.ke/safdaraja/ui/#go_live_tutorial">nice tutorial</a> here on migrating from Sandbox(test) environment, to Production(live) environment. We offer the service at a fiat fee of KSh 4000. Call <a href="tel:+254705459494">+254705459494</a> or email <a href="mailto:[email protected]">[email protected]</a> if you need help.</li>';
208
208
$this->has_fields = false;
209
209
210
210
// Load settings
@@ -396,6 +396,16 @@ public function init_form_fields()
396
396
'description' => __( 'ID of WordPress user to assign authorship of payments generated by this plugin', 'woocommerce' ),
397
397
'default' => __( '1', 'woocommerce' ),
398
398
'desc_tip' => true,
399
+
),
400
+
'completion' => array(
401
+
'title' => __( 'Order Status on Payment', 'woocommerce' ),
402
+
'type' => 'select',
403
+
'options' => array(
404
+
'complete' => __( 'Mark order as complete', 'woocommerce' ),
405
+
'processing' => __( 'Mark order as processing', 'woocommerce' )
406
+
),
407
+
'description' => __( 'What status to set the order after Mpesa payment has been received', 'woocommerce' ),
408
+
'desc_tip' => true,
399
409
)
400
410
);
401
411
}
@@ -591,15 +601,15 @@ public function process_payment( $order_id )
591
601
if( ! $content ){
592
602
$error_message = 'Could not connect to MPesa to process payment. Please try again';
593
603
$order->update_status( 'failed', __( 'Could not connect to MPesa to process payment.', 'woocommerce' ) );
0 commit comments