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

Hi, 


I am creating a new payment acquirer module for Beanstream Payment Solutions. For reference, I refered to the payment_ogone to have the same strucutre. Everything is working fine exept that the shopping cart do not clear itself and the system still thinks I am editing the same Sale orde because I am getting this error: It is forbidden to modify a sale order which is not in draft status. After the payment, my quote is set to done.

What am I doing wrong ?


def _beanstream_form_validate(self, cr, uid, tx, data, context=None):   
 status = data.get('trnApproved')
 res = {
    'acquirer_reference': data.get('trnId'),
    'beanstream_txn_type': data.get('trnType'),
}
if status == '1':
    _logger.info('Validated Beanstream payment for tx %s: set as done' % (tx.reference))
    res.update(state='done', date_validate=data.get('trnDate', fields.datetime.now()))
    return tx.write(res)
else:
    error = 'Received unrecognized status for Beanstream payment %s: %s, set as error' % (tx.reference, status)
    _logger.info(error)
    res.update(state='error', state_message=error)
    return tx.write(res)



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

Yes, but my problem was in fact related to the route it goes after the gateway processed my payment.


I used a different route and it worked. 


@http.route([    
    '/payment/beanstream/accept', '/payment/beanstream/test/accept',
], type='http', auth='none')

def beanstream_form_feedback(self, **post):
    """ Beanstream contacts using GET, at least for accept """
    _logger.info('Beanstream: entering form_feedback with post data %s', pprint.pformat(post)) # debug
    cr, uid, context = request.cr, SUPERUSER_ID, request.context
    request.registry['payment.transaction'].form_feedback(cr, uid, post, 'beanstream', context=context)
    order = request.registry['sale.order'].search(cr, uid, [('name', '=', post['trnOrderNumber'])])
    order = request.registry['sale.order'].browse(cr, uid, order)
    order.with_context(dict(context, send_email=True)).action_confirm()
    return werkzeug.utils.redirect(post.pop('return_url', '/shop/payment/validate'))
Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Have you seen anything like this happening with the paypal plugin for Odoo 11 CE? I am having the same thing - where the payment is processed but Odoo doesn't seem to know. When the shopper is redirected back to the odoo instance, it returns a 500 internal server error instead. Any help would be appreciated. Thank you!

Ảnh đại diện
Huỷ bỏ

I was able to figure this out. I had installed Odoo v11CE onto Ubuntu 18.04 without a compatible dependency. Reinstalled on Ubuntu 16.04 and everything worked great.

Câu trả lời hay nhất


I would be extremely interested in using this bean stream payment module, and would gladly pay for it.


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 2 25
4382
3
thg 2 24
3155
1
thg 11 20
10343
1
thg 9 20
3168
2
thg 5 20
5333