[#818] confirmInvoice method issue

Migrated from Redmine #818 | Author: Ghulam Ali
Status: Feedback | Priority: Immediate, there is BUG! | Created: 2021-11-14


Hey, I have impleted booking now im trying to confirm booking after payment and also show payment status to admin dashboard. But whilte using method confirmInvoice i dont know which value should i pass to id parameter. I have tried cart id or booking. there is not method to get invoice id or such value. How can is show transaction status manually in admin dashboard through company admin method or company public methods.
$confirm = $admin->confirmInvoice($booking->id, ‘PayPal’);

Dmytro Bondarev wrote:

Hi, please try to pass
{“handle_invoice”:true} to additional param of method book.
You will receive invoice in result and you will be able to use confirmInvoice method

You can try to find example of this param in this forum.

Ghulam Ali wrote:

$bookingsInfo = $client->book($eventId, 1, $date, $time, $clientData, [‘handle_invoice’ => true], null, null, null);
and that’s booking object im getting no invoice id in there.
{#294
+“id”: “47”
+“event_id”: “2”
+“unit_id”: 1
+“client_id”: “53”
+“client_hash”: “092cba86db39bb6bf4bad99c53d76c26”
+“start_date_time”: “2021-12-20 12:00:00”
+“end_date_time”: “2021-12-20 13:00:00”
+“time_offset”: “0”
+“is_confirmed”: “1”
+“require_payment”: false
+“code”: “30u1alc2”
+“hash”: “3a8395469e2ffde07867970cedbf3fc9”
}
Dmitry Bondarev wrote:

Hi, please try to pass
{“handle_invoice”:true} to additional param of method book.
You will receive invoice in result and you will be able to use confirmInvoice method

You can try to find example of this param in this forum.

Ghulam Ali wrote:

Thank You for support its solved.
Ghulam Ali wrote:

$bookingsInfo = $client->book($eventId, 1, $date, $time, $clientData, [‘handle_invoice’ => true], null, null, null);
and that’s booking object im getting no invoice id in there.
{#294
+“id”: “47”
+“event_id”: “2”
+“unit_id”: 1
+“client_id”: “53”
+“client_hash”: “092cba86db39bb6bf4bad99c53d76c26”
+“start_date_time”: “2021-12-20 12:00:00”
+“end_date_time”: “2021-12-20 13:00:00”
+“time_offset”: “0”
+“is_confirmed”: “1”
+“require_payment”: false
+“code”: “30u1alc2”
+“hash”: “3a8395469e2ffde07867970cedbf3fc9”
}
Dmitry Bondarev wrote:

Hi, please try to pass
{“handle_invoice”:true} to additional param of method book.
You will receive invoice in result and you will be able to use confirmInvoice method

You can try to find example of this param in this forum.