Changeset 3386994
- Timestamp:
- 10/30/2025 10:49:48 AM (5 months ago)
- Location:
- stitch-express
- Files:
-
- 10 edited
- 1 copied
-
tags/1.3.1 (copied) (copied from stitch-express/trunk)
-
tags/1.3.1/assets/banner-1544x500.png (modified) (previous)
-
tags/1.3.1/includes/stitch-express-client.php (modified) (2 diffs)
-
tags/1.3.1/includes/stitch-express-gateway.php (modified) (2 diffs)
-
tags/1.3.1/readme.txt (modified) (3 diffs)
-
tags/1.3.1/stitch-express.php (modified) (3 diffs)
-
trunk/assets/banner-1544x500.png (modified) (previous)
-
trunk/includes/stitch-express-client.php (modified) (2 diffs)
-
trunk/includes/stitch-express-gateway.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/stitch-express.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
stitch-express/tags/1.3.1/includes/stitch-express-client.php
r3235498 r3386994 98 98 int $amount, 99 99 string $payer_name, 100 ?string $payer_phone, 101 ?string $payer_email, 100 102 string $merchant_ref, 101 103 bool $skip_checkout_page … … 104 106 'amount' => $amount, 105 107 'payerName' => $payer_name, 108 'payerPhoneNumber' => $payer_phone, 109 'payerEmailAddress' => $payer_email, 106 110 'merchantReference' => $merchant_ref, 107 111 'skipCheckoutPage' => $skip_checkout_page, -
stitch-express/tags/1.3.1/includes/stitch-express-gateway.php
r3235498 r3386994 116 116 117 117 $total_in_cents = (int) ($order->get_total() * 100); 118 119 $payer_email = $order->get_billing_email(); 120 $payer_phonenumber = $order->get_billing_phone(); 118 121 $customer_name = substr( 119 122 $order->get_billing_first_name(). … … 128 131 129 132 try { 130 $url = $stitch_express_client->create_payment_link($total_in_cents, $customer_name, $ merchant_ref, $skip_checkout_page);133 $url = $stitch_express_client->create_payment_link($total_in_cents, $customer_name, $payer_phonenumber, $payer_email, $merchant_ref, $skip_checkout_page); 131 134 } catch (Exception $exception) { 132 135 $this->handle_api_error($exception, 'Payment failed. Please try again.'); -
stitch-express/tags/1.3.1/readme.txt
r3241711 r3386994 3 3 Tags: woocommerce, card, payments, south africa, apple pay, google pay, stitch, express, stitch express 4 4 Tested up to: 6.7 5 Stable tag: 1.3. 05 Stable tag: 1.3.1 6 6 License: GPLv3 7 7 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 83 83 84 84 == Changelog == 85 = 1.3.1 = 86 * Minor improvements 87 85 88 = 1.3.0 = 86 89 * Add refunds … … 152 155 153 156 == Upgrade Notice == 157 = 1.3.1 = 158 * Minor improvements 159 154 160 = 1.3.0 = 155 161 * Add refunds -
stitch-express/tags/1.3.1/stitch-express.php
r3235503 r3386994 9 9 * Description: Use Stitch Express to easily and securely accept Card payment on your WooCommerce store. 10 10 * Plugin URI: https://wordpress.org/plugins/stitchexpress/ 11 * Version: 1.3. 011 * Version: 1.3.1 12 12 * Requires at least: 6.5 13 13 * Requires PHP: 8.0 … … 77 77 $split_string = explode('-', $reference); 78 78 $order_id = $split_string[1]; 79 $override = $request->get_param('override') === 'true'; 79 80 80 81 $order = wc_get_order($order_id); … … 105 106 } 106 107 107 $order->payment_complete($payment_id); 108 $order->save(); 108 // Process payment if order is awaiting payment OR override flag is set 109 // Check both 'awaiting-payment' (plugin custom status) and 'pending' (WooCommerce default) 110 $is_awaiting_payment = in_array($order->get_status(), ['awaiting-payment', 'pending'], true); 109 111 110 return stitch_express_generate_webhook_response($order->get_checkout_order_received_url()); 112 if ($is_awaiting_payment || $override) { 113 $logger->info( 114 "Marking order {$order_id} with status '{$order->get_status()}' as complete. Stitch Payment ID: {$payment_id}", 115 ['source' => 'stitch-express'] 116 ); 117 118 $order->payment_complete($payment_id); 119 $order->save(); 120 121 return stitch_express_generate_webhook_response($order->get_checkout_order_received_url()); 122 } 123 124 // Skip payment completion to prevent duplicate notifications 125 $logger->info("Order {$order_id} status is '{$order->get_status()}', skipping payment completion", ['source' => 'stitch-express']); 126 127 return stitch_express_generate_webhook_response($order->get_view_order_url()); 111 128 } 112 129 -
stitch-express/trunk/includes/stitch-express-client.php
r3235498 r3386994 98 98 int $amount, 99 99 string $payer_name, 100 ?string $payer_phone, 101 ?string $payer_email, 100 102 string $merchant_ref, 101 103 bool $skip_checkout_page … … 104 106 'amount' => $amount, 105 107 'payerName' => $payer_name, 108 'payerPhoneNumber' => $payer_phone, 109 'payerEmailAddress' => $payer_email, 106 110 'merchantReference' => $merchant_ref, 107 111 'skipCheckoutPage' => $skip_checkout_page, -
stitch-express/trunk/includes/stitch-express-gateway.php
r3235498 r3386994 116 116 117 117 $total_in_cents = (int) ($order->get_total() * 100); 118 119 $payer_email = $order->get_billing_email(); 120 $payer_phonenumber = $order->get_billing_phone(); 118 121 $customer_name = substr( 119 122 $order->get_billing_first_name(). … … 128 131 129 132 try { 130 $url = $stitch_express_client->create_payment_link($total_in_cents, $customer_name, $ merchant_ref, $skip_checkout_page);133 $url = $stitch_express_client->create_payment_link($total_in_cents, $customer_name, $payer_phonenumber, $payer_email, $merchant_ref, $skip_checkout_page); 131 134 } catch (Exception $exception) { 132 135 $this->handle_api_error($exception, 'Payment failed. Please try again.'); -
stitch-express/trunk/readme.txt
r3241711 r3386994 3 3 Tags: woocommerce, card, payments, south africa, apple pay, google pay, stitch, express, stitch express 4 4 Tested up to: 6.7 5 Stable tag: 1.3. 05 Stable tag: 1.3.1 6 6 License: GPLv3 7 7 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 83 83 84 84 == Changelog == 85 = 1.3.1 = 86 * Minor improvements 87 85 88 = 1.3.0 = 86 89 * Add refunds … … 152 155 153 156 == Upgrade Notice == 157 = 1.3.1 = 158 * Minor improvements 159 154 160 = 1.3.0 = 155 161 * Add refunds -
stitch-express/trunk/stitch-express.php
r3235503 r3386994 9 9 * Description: Use Stitch Express to easily and securely accept Card payment on your WooCommerce store. 10 10 * Plugin URI: https://wordpress.org/plugins/stitchexpress/ 11 * Version: 1.3. 011 * Version: 1.3.1 12 12 * Requires at least: 6.5 13 13 * Requires PHP: 8.0 … … 77 77 $split_string = explode('-', $reference); 78 78 $order_id = $split_string[1]; 79 $override = $request->get_param('override') === 'true'; 79 80 80 81 $order = wc_get_order($order_id); … … 105 106 } 106 107 107 $order->payment_complete($payment_id); 108 $order->save(); 108 // Process payment if order is awaiting payment OR override flag is set 109 // Check both 'awaiting-payment' (plugin custom status) and 'pending' (WooCommerce default) 110 $is_awaiting_payment = in_array($order->get_status(), ['awaiting-payment', 'pending'], true); 109 111 110 return stitch_express_generate_webhook_response($order->get_checkout_order_received_url()); 112 if ($is_awaiting_payment || $override) { 113 $logger->info( 114 "Marking order {$order_id} with status '{$order->get_status()}' as complete. Stitch Payment ID: {$payment_id}", 115 ['source' => 'stitch-express'] 116 ); 117 118 $order->payment_complete($payment_id); 119 $order->save(); 120 121 return stitch_express_generate_webhook_response($order->get_checkout_order_received_url()); 122 } 123 124 // Skip payment completion to prevent duplicate notifications 125 $logger->info("Order {$order_id} status is '{$order->get_status()}', skipping payment completion", ['source' => 'stitch-express']); 126 127 return stitch_express_generate_webhook_response($order->get_view_order_url()); 111 128 } 112 129
Note: See TracChangeset
for help on using the changeset viewer.