Giter VIP home page Giter VIP logo

epayco-python's People

Contributors

alexdevepayco avatar andres-duque avatar danielquiroz87 avatar dayan0101 avatar dayancmm avatar devepayco avatar gerson-epayco avatar juanfelmesa avatar juanhurtadopayco avatar ricardosaldarriagapayco avatar romedu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

epayco-python's Issues

create a pending charge

Hello, is there a possibility to create a charge with a pending status and some time later make the payment?

Error en Retrieve customer

Retrieve
customer=objepayco.customer.get("eXj5Wdqgj7xzvC7AR")

Regresa <200>, pero no es un json, es un html, en sandbox

No such file or directory: 'pyepayco/utils/key_lang.json'

Tengo ese problema, ya agregué ese archivo pero sigue sin funcionar con este ejemplo

`cash_info = {
"invoice": "1472050778",
"description": "pay test",
"value": "20000",
"tax": "0",
"tax_base": "0",
"currency": "COP",
"type_person": "0",
"doc_type": "CC",
"doc_number": "100000",
"name": "testing",
"last_name": "PAYCO",
"email": "[email protected]",
"cell_phone": "3010000001",
"end_date": "2017-12-05",
"ip": "186.116.10.133",
"url_response": "https://tudominio.com/respuesta.php",
"url_confirmation": "https://tudominio.com/confirmacion.php",
"method_confirmation": "GET",

    }

    cash_efecty = objepayco.cash.create('efecty', cash_info)`

/lib/python3.5/site-packages/pyepayco/client.py", line 44, in setKeys file = open('pyepayco/utils/key_lang.json', 'r').read() FileNotFoundError: [Errno 2] No such file or directory: 'pyepayco/utils/key_lang.json'

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Hola
Estoy experimentando este problema con la API que suministran.
Estoy probando lo API y al momento de obtener la información de un cliente se dispara la excepción.

Intento hacer:
>>> customer=objepayco.customer.get("nxjxzoFvaZ4yT3SDj")
Y se lanza la excepción.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/sairth19/projects/epayco_test/env/lib/python3.5/site-packages/pyepayco/resources.py", line 80, in get
    self.epayco.lang
  File "/home/sairth19/projects/epayco_test/env/lib/python3.5/site-packages/pyepayco/client.py", line 182, in request
    return response.json()
  File "/home/sairth19/projects/epayco_test/env/lib/python3.5/site-packages/requests/models.py", line 892, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3.5/json/__init__.py", line 319, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.5/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.5/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Espero me puedan ayudar. Gracias!

El SDK de Python no permite cancelar suscripciones

La API como tal si lo permite:

def subscriptions_custom_cancel(self, subscription_id):
    url = 'https://api.secure.payco.co/recurring/v1/subscription/cancel'
    options = {'id': subscription_id, 'public_key': self.client.api_key}
    request = Request(url, urlencode(options).encode())
    canceled = urlopen(request).read().decode()
    return json.loads(canceled)

Por lo que esta sería una solución al problema que tienen.

Banka: Ocurrió uno error: undefined

Al momento de realizar un pago por PSE en el modo de pruebas, al momento de ingresar a la URL de PSE entregada

{
    "success": true,
    "titleResponse": "Success transaction pse",
    "textResponse": "Success transaction pse",
    "lastAction": "transaction_split_payment_pse",
    "data": {
        "ref_payco": 84307408,
        "factura": "2022310395ds612a3450",
        "descripcion": "Comprar Runer",
        "valor": 5000,
        "iva": 0,
        "ico": 0,
        "baseiva": 0,
        "moneda": "COP",
        "estado": "Pendiente",
        "respuesta": "Redireccionando al banco",
        "autorizacion": "2607770",
        "recibo": "843074081649088622",
        "fecha": "2022-04-04 1110:22",
        "urlbanco": "https://registro.desarrollo.pse.com.co/PSENF/index.html?enc=z1I3wT9Q2oRqTevPfSqhdenEu82goEGMd%2f5GMuBMzKs%3d",
        "transactionID": "2607770",
        "ticketId": "843074081649088622"
    }
}

una vez llenado el formulario y clickeado en el boton pagar aparece un mensaje de error diciendo Ocurrió uno error: undefined
error1
y luego el siguiente mensaje
Ocurrió uno error. Mensaje: {"readyState":4,"responseText":"{"Message":"An error has occurred."}","responseJSON":{"Message":"An error has occurred."},"status":500,"statusText":"Internal Server Error"}
imagen
curl que se envia al servidor y devuelve la respuesta de error en banka

curl 'https://desarrollo.pse.com.co/banka/api/Payments/Pay/2607806PIPE1019085201PIPE3892PIPEjuan@example.comPIPE3004896406PIPE/false' -X POST -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0' -H 'Accept: */*' -H 'Accept-Language: es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3' -H 'Accept-Encoding: gzip, deflate, br' -H 'X-Requested-With: XMLHttpRequest' -H 'Origin: https://desarrollo.pse.com.co' -H 'Connection: keep-alive' -H 'Referer: https://desarrollo.pse.com.co/banka/authorize' -H 'Sec-Fetch-Dest: empty' -H 'Sec-Fetch-Mode: cors' -H 'Sec-Fetch-Site: same-origin' -H 'Content-Length: 0' -H 'TE: trailers'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.