[#382] How to confirm booking via API

Migrated from Redmine #382 | Author: Dmitry Trofimets
Status: Feedback | Priority: High, I’m very impatient | Created: 2019-05-14


We have payment module activated - so the payment must be made to confirm existing booking.
Now that you have broken integration with the payment system, we have to recreate it on our side:
-That’s what I receive from the payment system:
out_summ=2500.000000&OutSum=2500.000000&inv_id=176&InvId=176&crc=5B9071DAA03081203FD60FC9A182E9C3&SignatureValue=5B9071DAA03081203FD60FC9A182E9C3&PaymentMethod=BankCard&IncSum=2500.000000&IncCurrLabel=BankCardPSR&EMail=email@566.orgShp_invoice=176
-What’s the proper way to confirm booking in terms of methods: get booking (how do I get it with the info above?), then confirm booking using booking id and booking hash?

Dmitry Trofimets wrote:

Hi, still here, waiting

Dmytro Bondarev wrote:

Hello!
Unfortunately currently it is impossible to confirm payment via API.

Dmitry Trofimets wrote:

But you have “confirmBooking” method in API documentation

Dmitry Trofimets wrote:

Actually you have
confirmBookingPayment ($id, $paymentProcessor, $sign)

No, seriously, here it is:

Dmytro Bondarev wrote:

Hello! Yes, it is. However, this method of API was deprecated and it will not work for new payment system.

Dmitry Trofimets wrote:

Good, I see now!

  1. What about old systems? We are using Robokassa.
  2. We want to integrate our own payment system. Can we use Confirm Booking module and confirm it via API (using ConfirmBooking method) after we ensure the payment is made on our side? Or am I correct to understand we won’t be able to use that method without booking id and booking hash, which we can’t really get… so the only option is to do recreate full booking starting with the book method in order to get the booking id and hash?

Thanks.
Dmitry.

Dmitry Trofimets wrote:

Good, I see now!

  1. What about old systems? We are using Robokassa.
  2. We want to integrate our own payment system. Can we use Confirm Booking module and confirm it via API (using ConfirmBooking method) after we ensure the payment is made on our side? Or am I correct to understand we won’t be able to use that method without booking id and booking hash, which we can’t really get… so the only option is to do recreate full booking starting with the book method in order to get the booking id and hash?

Thanks.
Dmitry.

Dmytro Bondarev wrote:

Hello! Sorry for delay.
Yes, you can use Approve Booking custom feature and on receive payment approve booking via admin API.