From 6ae6dd8430ee269e18d2b5128d4feafa410faaa5 Mon Sep 17 00:00:00 2001 From: Rene Vergara Date: Mon, 26 Jun 2023 09:50:12 -0500 Subject: [PATCH] Update payment confirmation for new API endpoint --- CHANGELOG.md | 6 ++++++ src/WooCommerce.hs | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26e1ba3..6eb85f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.7.0] + +### Changed + +- Modified payment confirmation to use new WooCommerce plugin API endpoint. + ## [1.6.0] ### Added diff --git a/src/WooCommerce.hs b/src/WooCommerce.hs index f0ebce6..5530e18 100644 --- a/src/WooCommerce.hs +++ b/src/WooCommerce.hs @@ -89,8 +89,9 @@ payWooOrder :: -> BS.ByteString -- Total ZEC for order -> IO () payWooOrder u i o t p z = do - wooReq <- parseRequest $ u ++ "/?wc-api=zpmtcallback" + wooReq <- parseRequest u let req = + setRequestPath "/wp-json/wc/v3/zgocallback" $ setRequestQueryString [ ("token", Just t) , ("orderid", Just o)