system
1
Migrated from Redmine #601 | Author: Veer Manhas
Status: Feedback | Priority: High, I’m very impatient | Created: 2020-11-08
Hi there,
I started integrating this system on our site for people to book a service.
- Get service details
- get user details
- get slots and show
- call book method to create their booking
- Taking payment on Paypal on our site
…
Two questions:
- On step 4, if I do not confirm payment the booking should be cancelled, it doesn’t.
- After step 5, which method to call to confirm the booking permanently?
system
2
Dmytro Bondarev wrote:
Hi, please pass ‘handle_invoice’ => true to $additional. It will make order for you and will cancel it by timeout in case no payment.
and then use admin API to confirm order after you receive payment - API documentation | SimplyBook.me Online Scheduling or API documentation | SimplyBook.me Online Scheduling
system
3
Veer Manhas wrote:
Dmitry Bondarev wrote:
Hi, please pass ‘handle_invoice’ => true to $additional. It will make order for you and will cancel it by timeout in case no payment.
and then use admin API to confirm order after you receive payment - API documentation | SimplyBook.me Online Scheduling or API documentation | SimplyBook.me Online Scheduling
Okay, will try that. Thanks so much.
In confirmInvoice ($id, $paymentSystem)
Confirms invoice by id
@param integer $id
@param string $paymentSystem
@return array
@throws Api_Entity_Exception
Can paymentSystem be any string for reference or it require particular format of string like additionalField requires ids and all?
system
5
Veer Manhas wrote:
Dmitry Bondarev wrote:
It can be any string
Thanks that helps.
But when I am calling it with Admin token.
POST CALL
{
status: 200,
statusText: ‘OK’,
headers: {
server: ‘nginx’,
date: ‘Mon, 09 Nov 2020 15:06:22 GMT’,
‘content-type’: ‘application/json; charset=UTF-8’,
‘content-length’: ‘121’,
connection: ‘close’,
‘access-control-allow-origin’: ‘*’,
‘access-control-allow-methods’: ‘POST, GET, OPTIONS’,
‘access-control-allow-headers’: ‘content-type, x-company-login, x-application-token, x-user-token, x-token, x-requested-with’,
‘x-xss-protection’: ‘1; mode=block’
},
config: {
url: ‘https://user-api.simplybook.me/’,
method: ‘post’,
data: ‘{“jsonrpc”:“2.0”,“method”:“confirmInvoice”,“params”:[39,“PayPal”],“id”:“87e0cd92-7a66-4e69-b93e-739790ba3435”}’,
headers: {
Accept: ‘application/json, text/plain, /’,
‘Content-Type’: ‘application/json’,
‘X-Company-Login’: ‘classes’,
‘X-User-Token’: ‘something’,
‘User-Agent’: ‘axios/0.20.0’,
‘Content-Length’: 110
},
Result:
data: {
error: { code: -32600, message: ‘Access denied’, data: },
id: ‘87e0cd92-7a66-4e69-b93e-739790ba3435’,
jsonrpc: ‘2.0’
}
system
6
Veer Manhas wrote:
Never mind, I got it. I needed to use /admin path
Thanks 