Boa noite Claudio, eu também estou tendo dificuldades com a url de retorno.
a Cielo está exigindo que a loja mostre na pagina de retorno, se a transa??o foi ou n?o aprovada. No momento tanto para transa??o aprovada ou reprovada, ela está exibindo a mesma mensagem: Obrigado. seu pedido foi recebido.
Já olhei o código da minha página de retorno, mas n?o estou achando o erro, sabe me dizer o porque disso?
segue o código:
<?php
/**
* Thankyou page
*/
if ( ! defined( ‘ABSPATH’ ) ) exit; // Exit if accessed directly
global $woocommerce;
if ( $order ) : ?>
<?php if ( $order->has_status( ‘failed’ ) ) : ?>
<p><?php _e( ‘Unfortunately your order cannot be processed as the originating bank/merchant has declined your transaction.’, ‘wpdance’ ); ?></p>
<p><?php
if ( is_user_logged_in() )
_e( ‘Please attempt your purchase again or go to your account page.’, ‘wpdance’ );
else
_e( ‘Please attempt your purchase again.’, ‘wpdance’ );
?></p>
<p>
get_checkout_payment_url() ); ?>” class=”button pay”><?php _e( ‘Pay’, ‘wpdance’ ) ?>
<?php if ( is_user_logged_in() ) : ?>
” class=”button pay”><?php _e( ‘My Account’, ‘wpdance’ ); ?>
<?php endif; ?>
</p>
<?php else : ?>
<p><?php echo apply_filters( ‘woocommerce_thankyou_order_received_text’, __( ‘Thank you. Your order has been received.’, ‘wpdance’ ), $order ); ?></p>
<ul class=”order_details”>
<li class=”order”>
<?php _e( ‘Order:’, ‘wpdance’ ); ?>
<?php echo $order->get_order_number(); ?>
<li class=”date”>
<?php _e( ‘Date:’, ‘wpdance’ ); ?>
<?php echo date_i18n( get_option( ‘date_format’ ), strtotime( $order->order_date ) ); ?>
<li class=”total”>
<?php _e( ‘Total:’, ‘wpdance’ ); ?>
<?php echo $order->get_formatted_order_total(); ?>
<?php if ( $order->payment_method_title ) : ?>
<li class=”method”>
<?php _e( ‘Payment method:’, ‘wpdance’ ); ?>
<?php echo $order->payment_method_title; ?>
<?php endif; ?>
<div class=”clear”></div>
<?php endif; ?>
<?php do_action( ‘woocommerce_thankyou_’ . $order->payment_method, $order->id ); ?>
<?php do_action( ‘woocommerce_thankyou’, $order->id ); ?>
<?php else : ?>
<p><?php echo apply_filters( ‘woocommerce_thankyou_order_received_text’, __( ‘Thank you. Your order has been received.’, ‘wpdance’ ), null ); ?></p>
<?php endif; ?>