From 8f3d39443f3fdccba6277032a462c42d5bb8c9bc Mon Sep 17 00:00:00 2001 From: Esteban Echeverry Date: Sat, 2 Dec 2017 19:24:26 -0500 Subject: [PATCH] Fix "lenguage" mispelling for "language" This could create an API backwards incompatibility, so a version increment should probably be done. --- README.rst | 6 +++--- pyepayco/client.py | 8 ++++---- pyepayco/epayco.py | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.rst b/README.rst index 7cb9161..b12c8a4 100644 --- a/README.rst +++ b/README.rst @@ -30,9 +30,9 @@ Usage apiKey = "491d6a0b6e992cf924edd8d3d088aff1" privateKey = "268c8e0162990cf2ce97fa7ade2eff5a" - lenguage = "ES" + language = "ES" test = True - options={"apiKey":apiKey,"privateKey":privateKey,"test":test,"lenguage":lenguage} + options={"apiKey":apiKey,"privateKey":privateKey,"test":test,"language":language} objepayco=epayco.Epayco(options) @@ -287,4 +287,4 @@ Retrieve .. code-block:: python - pay = epayco.charge.get("ref_payco") \ No newline at end of file + pay = epayco.charge.get("ref_payco") diff --git a/pyepayco/client.py b/pyepayco/client.py index fd50c57..f2d98f0 100644 --- a/pyepayco/client.py +++ b/pyepayco/client.py @@ -56,7 +56,7 @@ class Client: BASE_URL = "https://api.secure.payco.co"; BASE_URL_SECURE = "https://secure.payco.co"; IV = "0000000000000000"; - LENGUAGE = "python"; + LANGUAGE = "python"; SWITCH= False def __init__(self): @@ -107,7 +107,7 @@ def request(self,method='POST',url="",api_key="",data={}, private_key="",test="" addData = { 'public_key': api_key, 'i': base64.b64encode(self.IV.encode('ascii')), - 'lenguaje': self.LENGUAGE, + 'lenguaje': self.LANGUAGE, 'enpruebas': enpruebas, } @@ -136,7 +136,7 @@ def request(self,method='POST',url="",api_key="",data={}, private_key="",test="" 'public_key': api_key, 'i': base64.b64encode(self.IV.encode('ascii')), 'enpruebas': enpruebas, - 'lenguaje': self.LENGUAGE, + 'lenguaje': self.LANGUAGE, 'p': '' } enddata = {} @@ -221,4 +221,4 @@ def build_url(self,endpoint): return "{base_url}/{endpoint}".format( base_url=self.BASE_URL, endpoint=endpoint - ) \ No newline at end of file + ) diff --git a/pyepayco/epayco.py b/pyepayco/epayco.py index 15daa96..4a9e7f4 100644 --- a/pyepayco/epayco.py +++ b/pyepayco/epayco.py @@ -18,7 +18,7 @@ def __init__(self, options): self.api_key = options["apiKey"] self.private_key = options["privateKey"] self.test = options["test"] - self.lang = options["lenguage"] + self.lang = options["language"] self.token = Token(self) self.customer = Customers(self)