Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
5918 Lượt xem

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.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hello,

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

Thanks.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

hello did you got any solutions for that issue?

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 7 20
4443
2
thg 1 21
4265
3
thg 5 18
15004
2
thg 10 23
2201
1
thg 2 22
2308