Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0031743 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] Web POS | major | always | 2015-12-17 15:15 | 2016-12-14 16:38 | |||
Reporter | guillermogil | View Status | public | |||||
Assigned To | ranjith_qualiantech_com | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | RR17Q1 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 157a89812fe4 | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | marvintm | |||||||
OBNetwork customer | OBPS | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0031743: Cancel a payment with paymentData after a refresh creates an error | |||||||
Description | Cancel a payment with paymentData after a refresh creates an error. If you have an integration with a payment gateway a VoidTransactioni is a must but if you refresh the browser is not possible to cancel it. On refresh voidTransaction object gets removed. Error: TypeError: voidTransaction is not a function at callVoidTransaction (be0f4d927c46422af6a36c62b754d774_WebPOS.js:38168) at Object.OB.UTIL.showConfirmation.display.action (be0f4d927c46422af6a36c62b754d774_WebPOS.js:38203) at Object.button.tap (be0f4d927c46422af6a36c62b754d774_WebPOS.js:10015) at Object.enyo.kind.dispatch (enyo.js:628) at Object.enyo.kind.dispatchEvent (enyo.js:612) at Object.enyo.kind.inherited (enyo.js:410) at Object.enyo.kind.dispatchEvent (enyo.js:1338) at Object.enyo.kind.dispatchBubble (enyo.js:616) at Object.enyo.kind.bubble (enyo.js:604) at Object.enyo.dispatcher.dispatchBubble (enyo.js:1783) at Object.enyo.dispatcher.dispatch [as dispatch] (enyo.js:1762) at Object.enyo.dispatch (enyo.js:1788); line: Object.OB.UTIL.showError (http://localhost:8080/openbravo/web/js/gen/be0f4d927c46422af6a36c62b754d774_WebPOS.js:10150:6 [^]) (*,+)processConsoleLevel @ be0f4d927c46422af6a36c62b754d774_WebPOS.js:2522 be0f4d927c46422af6a36c62b754d774_WebPOS.js:38168 Uncaught TypeError: voidTransaction is not a function | |||||||
Steps To Reproduce | Add a Payment with paymentData and Void transaction function. e.g.- OB.MobileApp.model.receipt.addPayment(new OB.Model.PaymentLine({ kind: payment.payment.searchKey, name: OB.MobileApp.model.getPaymentName(payment.payment.searchKey), amount: OB.DEC.number(OB.DEC.div(amount, 100)), rate: payment.rate, mulrate: payment.mulrate, isocode: payment.isocode, isCash: payment.paymentMethod.iscash, allowOpenDrawer: payment.paymentMethod.allowopendrawer, openDrawer: payment.paymentMethod.openDrawer, printtwice: payment.paymentMethod.printtwice, paymentData: { voidConfirmation: false, serialNumber: voucherNumber, voidTransaction: function (callback) { callback(); } } }) Refresh the browser Try to cancel it | |||||||
Proposed Solution | It is needed to create an structure that on Cancel a Payment if it is a Payment Provider it will look to a function defined on the prototype of the kind (Payment Provider) used. If there is none it will call to void Transaction function. It will be needed to update the Payment Provider Wiki also. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ![]() | |||||||
![]() |
||||||||
|
![]() |
|
(0091828) hgbot (developer) 2016-11-25 11:12 |
Repository: erp/pmods/org.openbravo.retail.posterminal Changeset: 34c9be669bbc214ddc2221acfb6c5592251637dd Author: Ranjith S R <ranjith <at> qualiantech.com> Date: Fri Nov 25 15:42:04 2016 +0530 URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/34c9be669bbc214ddc2221acfb6c5592251637dd [^] Fixes issue 31743 : Adding condition to call Payment provider voidTransaction if it is not present in payment * If payment added through External Payment Provider, after refreshing we lost instance of voidTransaction. So while voiding payment it should check the voidTransaction in paymentprovider through prototype --- M web/org.openbravo.retail.posterminal/js/pointofsale/view/pointofsale.js --- |
(0092141) ranjith_qualiantech_com (viewer) 2016-12-06 13:50 |
Issue Reopened, voidTransaction should be checked first through prototype of Payment Provider and then it should check through paymentData Once issue fixed, Wiki & Sample module should be updated |
(0092241) hgbot (developer) 2016-12-09 11:53 |
Repository: erp/pmods/org.openbravo.retail.paymentprovider Changeset: 9c344bda7f1ae37ba00cecedca65cd66eb044244 Author: Ranjith S R <ranjith <at> qualiantech.com> Date: Fri Dec 09 15:46:25 2016 +0530 URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.paymentprovider/rev/9c344bda7f1ae37ba00cecedca65cd66eb044244 [^] Related to issue 31743 : Modified voidTransaction API * If voidTransaction is defined in top level, the it will be accessible through prototype --- M web/org.openbravo.retail.paymentprovider/js/connector.js --- |
(0092242) hgbot (developer) 2016-12-09 11:53 |
Repository: erp/pmods/org.openbravo.retail.posterminal Changeset: 820f74284a6718a8677a80c19fda6be9bdd21699 Author: Ranjith S R <ranjith <at> qualiantech.com> Date: Fri Dec 09 15:46:36 2016 +0530 URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/820f74284a6718a8677a80c19fda6be9bdd21699 [^] Fixes issue 31743 : Modified API to call Payment provider voidTransaction * While removing payment, in first to voidTransaction fn present in External Payment Provider throught prototype. If it not exists, it should check with payment Data * New params receipt, payment added to voidTransacion function --- M web/org.openbravo.retail.posterminal/js/pointofsale/view/pointofsale.js --- |
(0092279) marvintm (viewer) 2016-12-12 11:51 |
There is a problem with the way the function voidTransaction is being called right now. The problem is that we have changed the parameters which are sent to this function. Before, only the callback was sent. Now, the order, payment and callback are sent. As they are sent in this order, for voidTransaction functions which were defined at payment level, the API is now broken, as they will expect that the callback is the first parameter, and now this is not the case. The solution is quite easy, just call the voidTransaction function with the callback first, and then the order and payment. This way, old voidTransaction functions will still work, and new ones will receive the three parameters correctly. Don't forget also to change the existing payment provider module. |
(0092357) hgbot (developer) 2016-12-14 15:46 |
Repository: erp/pmods/org.openbravo.retail.posterminal Changeset: 157a89812fe44aa1691883a2f41189c8700c2081 Author: Ranjith S R <ranjith <at> qualiantech.com> Date: Wed Dec 14 20:15:46 2016 +0530 URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/157a89812fe44aa1691883a2f41189c8700c2081 [^] Fixes issue 31743 : Modified API to call Payment provider voidTransaction * Moved new Params(receipt, payment) for voidTransaction fn to last to support old api for callback --- M web/org.openbravo.retail.posterminal/js/pointofsale/view/pointofsale.js --- |
(0092358) hgbot (developer) 2016-12-14 15:47 |
Repository: erp/pmods/org.openbravo.retail.paymentprovider Changeset: abdda8f527731e39f1b08d374a4a961de497f358 Author: Ranjith S R <ranjith <at> qualiantech.com> Date: Wed Dec 14 20:17:08 2016 +0530 URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.paymentprovider/rev/abdda8f527731e39f1b08d374a4a961de497f358 [^] Related to issue 31743 : Modified voidTransaction API * Moved new Params(receipt, payment) for voidTransaction fn to last to support old api for callback --- M web/org.openbravo.retail.paymentprovider/js/connector.js --- |
![]() |
|||
Date Modified | Username | Field | Change |
2015-12-17 15:15 | guillermogil | New Issue | |
2015-12-17 15:15 | guillermogil | Assigned To | => Retail |
2015-12-17 15:15 | guillermogil | OBNetwork customer | => No |
2015-12-17 15:15 | guillermogil | Triggers an Emergency Pack | => No |
2015-12-17 15:16 | guillermogil | Description Updated | View Revisions |
2015-12-17 15:17 | guillermogil | File Added: Screenshot from 2015-12-17 15:16:07.png | |
2015-12-17 15:17 | guillermogil | Description Updated | View Revisions |
2015-12-17 15:17 | guillermogil | Relationship added | related to 0031742 |
2016-05-25 14:03 | ranjith_qualiantech_com | Assigned To | Retail => ranjith_qualiantech_com |
2016-05-25 14:04 | ranjith_qualiantech_com | Status | new => scheduled |
2016-05-25 14:31 | ranjith_qualiantech_com | Assigned To | ranjith_qualiantech_com => Retail |
2016-05-25 14:31 | ranjith_qualiantech_com | Status | scheduled => acknowledged |
2016-05-26 10:15 | guillermogil | Proposed Solution updated | |
2016-05-26 10:18 | guillermogil | Proposed Solution updated | |
2016-11-02 15:52 | guillermogil | OBNetwork customer | No => Yes |
2016-11-02 15:52 | guillermogil | Regression date | => 2016-11-30 |
2016-11-07 13:06 | guillermogil | Resolution time | => 1480460400 |
2016-11-07 13:06 | guillermogil | Regression date | 2016-11-30 => |
2016-11-09 14:10 | ranjith_qualiantech_com | Assigned To | Retail => ranjith_qualiantech_com |
2016-11-09 14:11 | ranjith_qualiantech_com | Status | acknowledged => scheduled |
2016-11-25 11:12 | hgbot | Checkin | |
2016-11-25 11:12 | hgbot | Note Added: 0091828 | |
2016-11-25 11:12 | hgbot | Status | scheduled => resolved |
2016-11-25 11:12 | hgbot | Resolution | open => fixed |
2016-11-25 11:12 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/34c9be669bbc214ddc2221acfb6c5592251637dd [^] |
2016-12-06 13:50 | ranjith_qualiantech_com | Note Added: 0092141 | |
2016-12-06 13:50 | ranjith_qualiantech_com | Status | resolved => new |
2016-12-06 13:50 | ranjith_qualiantech_com | Resolution | fixed => open |
2016-12-06 13:50 | ranjith_qualiantech_com | Status | new => scheduled |
2016-12-09 11:53 | hgbot | Checkin | |
2016-12-09 11:53 | hgbot | Note Added: 0092241 | |
2016-12-09 11:53 | hgbot | Checkin | |
2016-12-09 11:53 | hgbot | Note Added: 0092242 | |
2016-12-09 11:53 | hgbot | Status | scheduled => resolved |
2016-12-09 11:53 | hgbot | Resolution | open => fixed |
2016-12-09 11:53 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/34c9be669bbc214ddc2221acfb6c5592251637dd [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/820f74284a6718a8677a80c19fda6be9bdd21699 [^] |
2016-12-12 11:51 | marvintm | Note Added: 0092279 | |
2016-12-12 11:51 | marvintm | Status | resolved => new |
2016-12-12 11:51 | marvintm | Resolution | fixed => open |
2016-12-12 11:51 | marvintm | Status | new => scheduled |
2016-12-14 15:46 | hgbot | Checkin | |
2016-12-14 15:46 | hgbot | Note Added: 0092357 | |
2016-12-14 15:46 | hgbot | Status | scheduled => resolved |
2016-12-14 15:46 | hgbot | Resolution | open => fixed |
2016-12-14 15:46 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/820f74284a6718a8677a80c19fda6be9bdd21699 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/157a89812fe44aa1691883a2f41189c8700c2081 [^] |
2016-12-14 15:47 | hgbot | Checkin | |
2016-12-14 15:47 | hgbot | Note Added: 0092358 | |
2016-12-14 16:38 | marvintm | Review Assigned To | => marvintm |
2016-12-14 16:38 | marvintm | Status | resolved => closed |
2016-12-14 16:38 | marvintm | Fixed in Version | => RR17Q1 |
Copyright © 2000 - 2009 MantisBT Group |