Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Does this SDK work for PayU latam? #61

Unanswered
matsl92 asked this question in Q&A
Discussion options

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'
}

data = payu.transaction(**payload)
data['action'] = 'https://sandbox.checkout.payulatam.com/ppp-web-gateway-payu/'
html = payu.make_html(data)
return HttpResponse(html)
You must be logged in to vote

Replies: 1 comment

Comment options

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.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /