diff --git a/README.markdown b/README.markdown index fc11302..3c2da81 100644 --- a/README.markdown +++ b/README.markdown @@ -261,7 +261,9 @@ transaction.merchant_authorize # this will charge the card without user interact XML Transactions ================ -XML API is [deprecated](https://mailchi.mp/datatrans/basic-authdynamic-sign_reminder) by Datatrans. After June 3rd, 2024 all merchants will have to use JSON API. +> [!IMPORTANT] +> +> Datatrans will stop supporting the XML API on June 3rd, 2024. The support in this gem will be removed in the next major release. Please use the [JSON API](#json-transactions) instead. If you have already a credit card alias or an authorized transaction you can use the convenient XML methods to process payments. diff --git a/lib/datatrans/config.rb b/lib/datatrans/config.rb index 7453789..76164d2 100644 --- a/lib/datatrans/config.rb +++ b/lib/datatrans/config.rb @@ -43,15 +43,22 @@ def url(what, options = {}) case what when :web_authorize_url warn "DEPRECATION WARNING: Support for the payment page is deprecated and will be removed in the next major version. Please use the JSON API instead." + subdomain = SUBDOMAINS[:payment_page] path = "/upp/jsp/upStart.jsp" when :xml_authorize_url + warn "DEPRECATION WARNING: Support for the XML API is deprecated and will be removed in the next major version. Please use the JSON API instead." + subdomain = SUBDOMAINS[:server_to_server_api] path = "/upp/jsp/XML_authorize.jsp" when :xml_settlement_url + warn "DEPRECATION WARNING: Support for the XML API is deprecated and will be removed in the next major version. Please use the JSON API instead." + subdomain = SUBDOMAINS[:server_to_server_api] path = "/upp/jsp/XML_processor.jsp" when :xml_status_url + warn "DEPRECATION WARNING: Support for the XML API is deprecated and will be removed in the next major version. Please use the JSON API instead." + subdomain = SUBDOMAINS[:server_to_server_api] path = "/upp/jsp/XML_status.jsp" when :init_transaction diff --git a/lib/datatrans/xml/transaction.rb b/lib/datatrans/xml/transaction.rb index 36c838e..d866142 100644 --- a/lib/datatrans/xml/transaction.rb +++ b/lib/datatrans/xml/transaction.rb @@ -6,6 +6,8 @@ class Transaction attr_reader :response, :params, :datatrans def initialize(datatrans, params) + warn "DEPRECATION WARNING: Support for the XML API is deprecated and will be removed in the next major version. Please use the JSON API instead." + @datatrans = datatrans @params = params.symbolize_keys end diff --git a/lib/datatrans/xml/transaction/request.rb b/lib/datatrans/xml/transaction/request.rb index f8b9875..a9a1d37 100644 --- a/lib/datatrans/xml/transaction/request.rb +++ b/lib/datatrans/xml/transaction/request.rb @@ -13,6 +13,8 @@ def post(url, options = {}) end def initialize(datatrans, params) + warn "DEPRECATION WARNING: Support for the XML API is deprecated and will be removed in the next major version. Please use the JSON API instead." + @datatrans = datatrans @params = params end diff --git a/lib/datatrans/xml/transaction/response.rb b/lib/datatrans/xml/transaction/response.rb index e313b07..71268d3 100644 --- a/lib/datatrans/xml/transaction/response.rb +++ b/lib/datatrans/xml/transaction/response.rb @@ -3,6 +3,8 @@ class Response attr_reader :params, :datatrans def initialize(datatrans, params) + warn "DEPRECATION WARNING: Support for the XML API is deprecated and will be removed in the next major version. Please use the JSON API instead." + @datatrans = datatrans @params = params end