Android Question Booking an Eventbrite Event from a webview

Andrew (Digitwell)

Well-Known Member
Licensed User
Longtime User
Hi,
I'm trying to book an eventbrite event via an app.
The documentation here -> https://www.eventbrite.com/platform/docs/embedded-checkout

suggests that all you need to do it embed the script in your page.

Unforunately it does ot work. All I get is a loading circle and it gets no further.

I tried the same thing from a website and the page works fine. (there were minor changes to hardcode the event)

Has anyone done this before or can tell me what I am doing wrong?

I attach a sample program which demonstrates the problem.

Thanks
 

Attachments

  • eventbritebooking.zip
    10 KB · Views: 181

JohnC

Expert
Licensed User
Longtime User
I have not looked at your code, but the first thing I would make sure you are doing is to add the "ChromeClient" to the webview using WebViewExtras (do a search in this forum)
 
Upvote 0

Andrew (Digitwell)

Well-Known Member
Licensed User
Longtime User
Unfortunately, that does not appear to make any difference.

I have also added:
B4X:
    Private chromeclient As DefaultWebChromeClient
    chromeclient.Initialize("chromeclient")
    we.SetWebChromeClient(chromeclient)
    
    ' fromlibrary Webview settings'
    wvs.setJavaScriptCanOpenWindowsAutomatically(WebView1,True)
    
    ' from library WebViewExtender
    wvee.setJavaScriptEnabled(WebView1,True)
 

Attachments

  • eventbritebookingv2.zip
    10.1 KB · Views: 195
Upvote 0

DonManfred

Expert
Licensed User
Longtime User

The Eventbrite API:
  • Is REST-based (though we use POST instead of PUT).
  • Uses OAuth2 for authorization.
  • Always returns responses in JSON.
All URLs referenced in the API documentation have the following base: https://www.eventbriteapi.com/v3.

You do not need a webview, or even different libraries.

Use okhttputils2 and you are ready to use the full Api.
 
Upvote 0

Andrew (Digitwell)

Well-Known Member
Licensed User
Longtime User
You do not need a webview, or even different libraries.

Use okhttputils2 and you are ready to use the full Api.

This it true for everything EXCEPT booking an event.
The only way to book an event is to use the checkout experience as linked in the first post.

Once an event is booked then the API works great to get the order etc.
I already am using the REST API to read the list of events / display them etc, even authenticate the user to display their list of booked events.

From Eventbrite forum,
Hi there.

My name is Jason and I am a member Eventbrite's Customer Experience Team. We currently don't have API endpoints that will allow users to check out on your website. However, we do have an embedded checkout that you could use for your website. Here is the documentation on our embedded checkout widget.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
This it true for everything EXCEPT booking an event.
Ohh i see. Honestly i did not read their pages in complete... I just found the site i posted, read there that they are using REST and my 1st thought was to suggest okhttputils2 :)
 
Upvote 0

Andrew (Digitwell)

Well-Known Member
Licensed User
Longtime User
Right. I think I have a partial solution.

If I put the same code webpage code that I have in the string for LoadHtml into a php script and then call the php script with a parameter which is the event id then it all works!

It seems to be something to do with SSL, but not quite sure.
 
Upvote 0
Top