Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
5874 Zobrazení

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
Zrušit
Nejlepší odpověď

Hello,

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

Thanks.

Avatar
Zrušit
Nejlepší odpověď

hello did you got any solutions for that issue?

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
0
čvc 20
4387
2
led 21
4187
3
kvě 18
14954
2
říj 23
2138
1
úno 22
2249