--- bak/class-wc-banklink-maksekeskus-redirect-gateway.php 2017-12-03 21:07:00.000000000 +0200 +++ class-wc-banklink-maksekeskus-redirect-gateway.php 2017-12-04 00:20:37.000000000 +0200 @@ -77,15 +77,33 @@ // Get the order $order = wc_get_order( $order_id ); + // Construct return urls array + $return_url = array ( + 'url' => $this->get_option( 'return_url' ), + 'method' => "POST" + ); + + $transaction_url = array ( + 'return_url' => $return_url, + 'cancel_url' => $return_url, + 'notification_url' => $return_url + ); + // Request $request = array( 'shop' => $this->get_option( 'shop_id' ), 'amount' => round( $order->get_total(), 2 ), 'reference' => wc_estonian_gateways_get_order_id( $order ), 'country' => wc_estonian_gateways_get_customer_billing_country( $order ), - 'locale' => $this->get_option( 'locale' ) + 'locale' => $this->get_option( 'locale' ), + 'transaction_url' => $transaction_url ); + // fix json_encode float precision bug in PHP 7.1 + if (version_compare(phpversion(), '7.1', '>=')) { + ini_set( 'serialize_precision', -1 ); + } + // Generate MAC code $mac_code = $this->get_signature( $request );