Changeset 2205828
- Timestamp:
- 12/04/2019 10:48:39 AM (6 years ago)
- File:
-
- 1 edited
-
woo-paysenz-payment-gateway/trunk/paysenz.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woo-paysenz-payment-gateway/trunk/paysenz.php
r2202268 r2205828 139 139 $type = 'WooCommerce Order'; 140 140 $model_name = ''; 141 $buyer_address = $billing_info['address_1'] ? $billing_info['address_1'] : $billing_info['city']; 142 $buyer_postcode = $billing_info['postcode'] ? $billing_info['postcode'] : $billing_info['state']; 141 143 142 144 $make_array = array( 143 145 'buyer_name' => $billing_info['first_name'].' '.$billing_info['last_name'], 144 146 'buyer_email' => $billing_info['email'], 145 'buyer_address' => $b illing_info['address_1'],147 'buyer_address' => $buyer_address, 146 148 'cus_city' => $billing_info['city'], 147 149 'cus_state' => $billing_info['state'], 148 'cus_postcode' => $b illing_info['postcode'],150 'cus_postcode' => $buyer_postcode, 149 151 'cus_country' => $billing_info['country'], 150 152 'buyer_contact_number' => $billing_info['phone'], … … 202 204 if (!empty($_POST['payment_status']) && sanitize_text_field($_POST['payment_status']) == 'Successful') { 203 205 $order = wc_get_order( sanitize_text_field($_POST['custom_4']) ); 206 207 // The text for the note 208 $make_notes = 'Total Amount: '.sanitize_text_field($_POST['payment_status']).', Paysenz Txn ID: '.sanitize_text_field($_POST['psz_txnid']).', Merchant Txn ID: '.sanitize_text_field($_POST['merchant_txnid']).', Type: '.sanitize_text_field($_POST['payment_type']).', Currency: '.sanitize_text_field($_POST['merchant_currency']).''; 209 210 // Add the note 211 $order->add_order_note( $make_notes ); 212 213 // save 214 $order->save(); 215 204 216 $order->payment_complete(); 205 217 … … 214 226 215 227 $order = wc_get_order( sanitize_text_field($_GET['custom_4']) ); 228 229 // The text for the note 230 $make_notes = 'Total Amount: '.sanitize_text_field($_POST['payment_status']).', Paysenz Txn ID: '.sanitize_text_field($_POST['psz_txnid']).', Merchant Txn ID: '.sanitize_text_field($_POST['merchant_txnid']).', Type: '.sanitize_text_field($_POST['payment_type']).', Currency: '.sanitize_text_field($_POST['merchant_currency']).''; 231 232 // Add the note 233 $order->add_order_note( $make_notes ); 234 235 // save 236 $order->save(); 237 216 238 $order->payment_complete(); 217 239 //$order->wc_reduce_stock_levels();
Note: See TracChangeset
for help on using the changeset viewer.