Changeset 3443987
- Timestamp:
- 01/21/2026 11:00:32 AM (2 months ago)
- Location:
- esto-payment-methods/trunk
- Files:
-
- 4 edited
-
Readme.txt (modified) (2 diffs)
-
esto-payment-methods.php (modified) (1 diff)
-
includes/class-esto-callback-handler.php (modified) (1 diff)
-
includes/class-esto-request.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
esto-payment-methods/trunk/Readme.txt
r3439262 r3443987 1 1 === ESTO payment methods === 2 2 Contributors: estogroup 3 Stable tag: 3.0.1 53 Stable tag: 3.0.16 4 4 Requires at least: 4.2 5 5 Tested up to: 6.9 … … 81 81 82 82 == Changelog == 83 = 3.0.16 = 84 * Improved: Custom order references will be synced with Affiliate Portal 85 83 86 = 3.0.15 = 84 87 * Fixed deprecated notice (ESTO X calculator) -
esto-payment-methods/trunk/esto-payment-methods.php
r3439262 r3443987 4 4 * Plugin URI: https://www.esto.ee 5 5 * Description: Adds ESTO payment methods to webshop 6 * Version: 3.0.1 56 * Version: 3.0.16 7 7 * Author: ESTO AS 8 8 * Author URI: https://www.esto.eu -
esto-payment-methods/trunk/includes/class-esto-callback-handler.php
r3417443 r3443987 102 102 * Get the order reference from the callback data. 103 103 * 104 * When merchant_message not equals with reference, we treat merchant_message as the real order reference. 105 * Otherwise we fall back to using reference. 106 * 104 107 * @return int Order ID. 105 108 * @throws Exception If no reference is found. 106 109 */ 107 110 private function esto_get_order_reference() { 111 108 112 if ( empty( $this->request_data['reference'] ) ) { 109 113 throw new Exception( 'Missing reference in callback data.' ); 110 114 } 111 $this->reference = $this->request_data['reference']; 112 esto_log( 'Using reference: ' . $this->reference ); 115 116 $reference = (string) $this->request_data['reference']; 117 $merchant_message = isset( $this->request_data['merchant_message'] ) 118 ? (string) $this->request_data['merchant_message'] 119 : ''; 120 121 // Detect custom webshop order reference usage. 122 if ( ! empty( $merchant_message ) && $merchant_message !== $reference ) { 123 $this->reference = $merchant_message; 124 esto_log( 'Custom order reference detected: ' . $this->reference ); 125 } else { 126 $this->reference = $reference; 127 esto_log( 'Using order reference for validation: ' . $this->reference ); 128 } 113 129 114 130 $order_id = (int) $this->reference; 115 131 esto_log( 'Looking up order ID: ' . $order_id ); 116 132 117 return $ this->reference;133 return $order_id; 118 134 } 119 135 -
esto-payment-methods/trunk/includes/class-esto-request.php
r3417199 r3443987 426 426 'shop_id' => $this->shop_id, 427 427 'amount' => $this->order->get_total(), 428 'reference' => (string) $ wp_order_id,429 'message' => (string) $ order_id,428 'reference' => (string) $order_id, 429 'message' => (string) $wp_order_id, 430 430 'return_url' => site_url( '/wc-api/esto-callback' ), 431 431 'notification_url' => site_url( '/wc-api/esto-callback' ),
Note: See TracChangeset
for help on using the changeset viewer.