has_status( array( 'completed', 'processing' ) ) && 'PAID' === strtoupper( (string) $order->get_meta( '_ainepay_status' ) ); if ( $paid_backed ) { $state = 'paid'; $state_label = __( 'Payment confirmed', 'ainepay-for-woocommerce' ); } elseif ( $order->has_status( 'refunded' ) ) { $state = 'refunded'; $state_label = __( 'Refunded', 'ainepay-for-woocommerce' ); } elseif ( $order->has_status( 'cancelled' ) ) { $state = 'cancelled'; $state_label = __( 'Order cancelled', 'ainepay-for-woocommerce' ); } elseif ( $order->has_status( 'failed' ) ) { $state = 'expired'; $state_label = __( 'Payment window expired', 'ainepay-for-woocommerce' ); } elseif ( $order->has_status( array( 'processing', 'completed' ) ) ) { // Unbacked success state: WC shows paid but AinePay has not confirmed // it. Never reveal the pay address here — that would invite a double payment — // and never claim "paid". Show a neutral "confirming" badge while the async // guard verifies (and the page keeps polling for the resolution). $state = 'verifying'; $state_label = __( 'Confirming payment…', 'ainepay-for-woocommerce' ); } else { $state = 'awaiting'; $state_label = __( 'Awaiting payment', 'ainepay-for-woocommerce' ); } $show_address = ( 'awaiting' === $state ) && '' !== (string) $address; ?>

' . esc_html( $qty ) . '', esc_html( $coin ), esc_html( $chain ) ); ?>

0 ? '' : 'style="display:none"'; ?>> —