Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
5513 Weergaven

Hi community,

 I need to intgrate Odoo ecommerce  with sagepay. I followed sagepay document "Sage Pay Server Integration and Protocol Guidelines 3.00". I got respose to my NotificationURL given. But I couldn't return the data with RedirectURL.

Here is the code:

@http.route('/payment/sagepay/complete', type='json', auth="public", methods=['POST', 'GET'])

def sagepay_complete(self, **post):

    cr, uid, context = request.cr, SUPERUSER_ID, request.context

    validate_url = 'https://test.sagepay.com/gateway/service/vspserver-register.vsp'

    base_url = request.httprequest.host_url

    return_url = '%s' % urlparse.urljoin(base_url, '/payment/paysage')

    reply_values = '''Status=OK

    RedirectURL=%s

    StatusDetail=0000 : The Authorisation was Successful.''' % return_url

    return reply_values

@http.route('/payment/paysage', type='http', auth="none", methods=['POST', 'GET'])

def sagepay_complete_redirect(self, **post):

    cr, uid, context = request.cr, SUPERUSER_ID, request.context

    res = self.sagepay_validate_data(**post)

    print "=sagepay_complete==res===",res

    return_url = self._get_return_url(res, **post)

    return werkzeug.utils.redirect(return_url)

Here first url '/payment/sagepay/complete' is the NotificationURL. I got response to this url. I returned the response with RedirectURL '/payment/paysage'. But it always gives the error 5006. Please guide me if I am missing something.

Avatar
Annuleer
Beste antwoord

Hello,

You may please check https://apps.odoo.com/apps/modules/10.0/payment_sagepay/.

Thanks.

Avatar
Annuleer
Beste antwoord

hello did you got any solutions for that issue?

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
0
jul. 20
3795
2
jan. 21
3566
3
mei 18
14236
2
okt. 23
1514
1
feb. 22
1756