This question has been flagged

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
Discard
Best Answer

Hello,

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

Thanks.

Avatar
Discard
Best Answer

hello did you got any solutions for that issue?

Avatar
Discard