Replies: 1 comment
-
I'm not sure about this, if all other functinalities are same only url need to be changed means, we can set this urls as a configurable by default. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Acording to PayU's documentation (https://developers.payulatam.com/latam/en/docs/integrations/api-integration/queries-api.html) the following are the urls to be used:
Pruebas: https://sandbox.api.payulatam.com/reports-api/4.0/service.cgi
Producción: https://api.payulatam.com/reports-api/4.0/service.cgi
Meanwhile, SDK paywix comes with the following urls specified in config.PAYU_CONFIGS
'test': 'https://test.payu.in/_payment',
'live': 'https://secure.payu.in/_payment',
"api_live": "https://info.payu.in/merchant/postservice?form=2",
"api_test": "https://test.payu.in/merchant/postservice.php?form=2",
After instantiating Payu class and storing what the transaction method returned inside a variable called "data", I changed the value of "action" key inside "data" (which is a dict-like object) for one of the urls provided by PayU LATAM. However, when I send the HTTP response and get redirect to PayU's page I get an error which says that the next values or parameters cannot be empty:
refVenta
usuarioId
cuentaId
descripcion
views.py
def pago(request):
print(request.POST)
pk = dict(request.POST).get('pk')
success_url = settings.RESPONSE_URL_SUCCESS
failure_url = settings.RESPONSE_URL_FAILURE
f
payload = {
"amount": "230",
"firstname": "Renjith",
"email": "dsfsdfds@gmail.com",
"phone": "",
"lastname": "sraj",
"productinfo": "ORDER FOR E_CART",
"txnid": "OR_123_45678_133",
"furl": failure_url,
"surl": success_url,
# "pk": pk,
# 'refVenta': "OR_123_45678_133",
# 'usuarioId': '23m73625',
# 'cuentaId': '508029',
# 'descripcion': 'first_try'
}
Beta Was this translation helpful? Give feedback.
All reactions