summaryrefslogtreecommitdiff
path: root/plugin/GNU-Taler-Payment-Gateway/class-wc-gnutaler-gateway.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/GNU-Taler-Payment-Gateway/class-wc-gnutaler-gateway.php')
-rw-r--r--plugin/GNU-Taler-Payment-Gateway/class-wc-gnutaler-gateway.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugin/GNU-Taler-Payment-Gateway/class-wc-gnutaler-gateway.php b/plugin/GNU-Taler-Payment-Gateway/class-wc-gnutaler-gateway.php
index 99a2a4b..8aece9d 100644
--- a/plugin/GNU-Taler-Payment-Gateway/class-wc-gnutaler-gateway.php
+++ b/plugin/GNU-Taler-Payment-Gateway/class-wc-gnutaler-gateway.php
@@ -234,7 +234,7 @@ function gnutaler_init_gateway_class()
if ( $email->id == 'customer_refunded_order' ) {
$backend_url = $this->GNU_Taler_Backend_URL;
$wc_order_id = $wc_order->get_order_key() . '-' . $wc_order->get_order_number();
- $refund_url = $backend_url . '/orders/' . $wc_order_id;
+ $refund_url = $wc_order->get_meta ('GNU_TALER_REFUND_URL');
echo sprintf ( __( 'Refund granted. Visit <a href="%s">%s</a> to obtain the refund.', 'gnutaler' ),
$refund_url,
$refund_url);
@@ -773,8 +773,12 @@ function gnutaler_init_gateway_class()
. '?h_contract='
. $h_contract;
$wc_order->update_status( 'refunded' );
- $this->debug( sprintf ( __('Received refund URI %s from Taler backend', 'gnutaler' ),
+ $this->debug( sprintf( __('Received refund URI %s from Taler backend', 'gnutaler' ),
$refund_uri ) );
+ $this->notice( sprintf( __('The user must visit %s to obtain the refund', 'gnutaler' ),
+ $refund_url ) );
+ $wc_order->add_meta_data( 'GNU_TALER_REFUND_URL', $refund_url );
+
return true;
case 403:
return new WP_Error( 'error',