Skip to content

Commit 30bdc96

Browse files
committed
payments: allow to see paid invoice
1 parent dbd8c40 commit 30bdc96

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

handlers/payments/invoice/controller/invoice.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ exports.get = function*() {
1717
this.throw(404);
1818
}
1919

20-
if (this.transaction.status != Transaction.STATUS_PENDING || this.transaction.paymentMethod != 'invoice') {
20+
if ( (this.transaction.status != Transaction.STATUS_PENDING && this.transaction.status != Transaction.STATUS_SUCCESS) || this.transaction.paymentMethod != 'invoice') {
2121
this.log.debug("Improper transaction", this.transaction.toObject());
2222
this.throw(400);
2323
}

handlers/payments/lib/getOrderInfo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function* getOrderInfo(order) {
5050
statusText: "Оплата получена",
5151
transaction: transaction,
5252
descriptionProfile: transaction.paymentMethod == 'invoice' && transaction.paymentDetails.agreementRequired ?
53-
`Вы можете повторно скачать <a href="proxy.php?url=https%3A%2F%2Fwww.github.com%2Fpayments%2Finvoice%2F%3Cspan+class%3D"pl-s1">${transaction.number}/invoice.docx">скачать счёт</a>
53+
`Вы можете повторно скачать <a href="proxy.php?url=https%3A%2F%2Fwww.github.com%2Fpayments%2Finvoice%2F%3Cspan+class%3D"pl-s1">${transaction.number}/invoice.docx">счёт</a>
5454
и <a href="/payments/invoice/${transaction.number}/agreement.docx">договор с актом</a>.` :
5555
''
5656
// no title/accent/description, because the action on success is order-module-dependant

0 commit comments

Comments
 (0)