Changeset 2956083
- Timestamp:
- 08/21/2023 08:46:44 AM (3 years ago)
- Location:
- slimcd-payment-gateway
- Files:
-
- 2 edited
-
tags/1.0.3/includes/class-slimcd-payment-gateway.php (modified) (1 diff)
-
trunk/includes/class-slimcd-payment-gateway.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
slimcd-payment-gateway/tags/1.0.3/includes/class-slimcd-payment-gateway.php
r2954016 r2956083 159 159 * @return void 160 160 */ 161 public function slimcd_postback()161 public function slimcd_postback() 162 162 { 163 163 header('Content-Type: text/plain'); 164 164 $postBackStatus = "Not OK"; 165 165 if (isset($_POST['approved']) && isset($_POST['order_id'])) { 166 166 if ("Success" == $this->slimcd_payment_status(sanitize_key($_POST['sessionid']))) { 167 167 $order_id = wc_sanitize_order_id($_POST['order_id']); 168 168 $order = wc_get_order($order_id); 169 if ($order->get_payment_method() == "slimcd_payment" && $_POST['approved'] == "Y" || $_POST['approved'] == "B") { 170 if (isset($_POST['surcharge']) && $_POST['surcharge'] != 0.00 || isset($_POST['conveniencefee']) && $_POST['conveniencefee'] != 0.00) { 171 172 include __DIR__ . '/convience-surcharge.php'; 169 if ($order->get_payment_method() == "slimcd_payment" && $_POST['approved'] == "Y" || $_POST['approved'] == "B") { 170 if (isset($_POST['surcharge']) && $_POST['surcharge'] != 0.00 || isset($_POST['conveniencefee']) && $_POST['conveniencefee'] != 0.00) { 171 include __DIR__ . '/convience-surcharge.php'; 172 } 173 $this->slimcd_update_order_status($order_id); 174 add_post_meta($order_id, '_transaction_id', (int)$_POST['gateid']); 175 $postBackStatus = "OK"; 173 176 } 174 $this->slimcd_update_order_status($order_id); 175 add_post_meta($order_id, '_transaction_id', (int)$_POST['gateid']); 176 echo "OK"; 177 } else { 178 echo "Not OK"; 179 } 180 } else { 181 echo "Not OK"; 182 } 183 184 177 } 178 } 179 echo $postBackStatus; 185 180 die(); 186 181 } -
slimcd-payment-gateway/trunk/includes/class-slimcd-payment-gateway.php
r2954026 r2956083 162 162 { 163 163 header('Content-Type: text/plain'); 164 164 $postBackStatus = "Not OK"; 165 165 if (isset($_POST['approved']) && isset($_POST['order_id'])) { 166 166 if ("Success" == $this->slimcd_payment_status(sanitize_key($_POST['sessionid']))) { 167 167 $order_id = wc_sanitize_order_id($_POST['order_id']); 168 168 $order = wc_get_order($order_id); 169 if ($order->get_payment_method() == "slimcd_payment" && $_POST['approved'] == "Y" || $_POST['approved'] == "B") { 170 if (isset($_POST['surcharge']) && $_POST['surcharge'] != 0.00 || isset($_POST['conveniencefee']) && $_POST['conveniencefee'] != 0.00) { 171 172 include __DIR__ . '/convience-surcharge.php'; 169 if ($order->get_payment_method() == "slimcd_payment" && $_POST['approved'] == "Y" || $_POST['approved'] == "B") { 170 if (isset($_POST['surcharge']) && $_POST['surcharge'] != 0.00 || isset($_POST['conveniencefee']) && $_POST['conveniencefee'] != 0.00) { 171 include __DIR__ . '/convience-surcharge.php'; 172 } 173 $this->slimcd_update_order_status($order_id); 174 add_post_meta($order_id, '_transaction_id', (int)$_POST['gateid']); 175 $postBackStatus = "OK"; 173 176 } 174 $this->slimcd_update_order_status($order_id); 175 add_post_meta($order_id, '_transaction_id', (int)$_POST['gateid']); 176 echo "OK"; 177 } else { 178 echo "Not OK"; 179 } 180 } else { 181 echo "Not OK"; 182 } 183 184 177 } 178 } 179 echo $postBackStatus; 185 180 die(); 186 181 }
Note: See TracChangeset
for help on using the changeset viewer.