@@ -191,9 +191,11 @@ public function payment_scripts() {
191191 return ;
192192 }
193193
194+ $ suffix = ( defined ( 'SCRIPT_DEBUG ' ) && SCRIPT_DEBUG ) ? '' : '.min ' ;
195+
194196 wp_enqueue_script ( 'paystack ' , 'https://js.paystack.co/v1/inline.js ' , array ( 'jquery ' ), '1.0.0 ' , true );
195197
196- wp_enqueue_script ( 'wc_paystack ' , plugins_url ( 'assets/js/paystack.js ' , __FILE__ ), array ('paystack ' ), '1.0.0 ' , true );
198+ wp_enqueue_script ( 'wc_paystack ' , plugins_url ( 'assets/js/paystack ' . $ suffix . ' .js ' , __FILE__ ), array ('paystack ' ), '1.0.0 ' , true );
197199
198200 $ paystack_params = array (
199201 'key ' => $ this ->public_key
@@ -208,7 +210,7 @@ public function payment_scripts() {
208210 $ email = $ order ->billing_email ;
209211 $ amount = $ order ->order_total * 100 ;
210212
211- $ txnref = $ order_id . '| ' . time ();
213+ $ txnref = $ order_id . '_ ' .time ();
212214
213215 if ( $ order ->id == $ order_id && $ order ->order_key == $ order_key ) {
214216 $ paystack_params ['email ' ] = $ email ;
@@ -285,7 +287,7 @@ public function verify_paystack_transaction() {
285287
286288 if ( 'success ' == $ paystack_response ->data ->status ) {
287289
288- $ order_details = explode ( '| ' , $ paystack_response ->data ->reference );
290+ $ order_details = explode ( '_ ' , $ paystack_response ->data ->reference );
289291
290292 $ order_id = (int ) $ order_details [0 ];
291293
@@ -331,7 +333,7 @@ public function verify_paystack_transaction() {
331333 }
332334 else {
333335
334- $ order_details = explode ( '| ' , $ _REQUEST ['paystack_txnref ' ] );
336+ $ order_details = explode ( '_ ' , $ _REQUEST ['paystack_txnref ' ] );
335337
336338 $ order_id = (int ) $ order_details [0 ];
337339
0 commit comments