[#963] How can I get a order id before the accept payment?

Migrated from Redmine #963 | Author: jacky wan
Status: Feedback | Priority: Normal | Created: 2022-11-17


What I want to do for BELOW

  1. PayPal Flow
    Get a order id TO generate a existing PayPal Flow provided by simplybook
  2. Manual Flow
    Get a order id TO embed in whatsapp message

I attached a diagram for your reference

Dmytro Bondarev wrote:

Hi,

Please pass “handle_invoice”: true to $additional parameter.
You will receive payment details. in response.

jacky wan wrote:

Sorry, Dmitry,
Would you mind to tell me which url request that I need to pass the parameter of handle_invoice?

Dmytro Bondarev wrote:

Hi,

you should pass it to book() API method.

jacky wan wrote:

can i use book() in public service
According to the offical sample as below ?
var res = this.client.book(
this.eventId, unitId, this.date, this.time,
{‘name’: jQuery(‘#name’).val(), ‘email’: jQuery(‘#email’).val(), ‘phone’: jQuery(‘#phone’).val()},
this.getAdditionalFieldsValues({
“handle_invoice”: true
}), this.qty
);