Mark7294305
Posts: 0
Joined: Fri Dec 26, 2014 2:10 am

Unable to see coupon information

Hello Support
I have created some coupons on a site called Beevou. I then connect to the Beevou site using the appery platform where I can access the coupon using my app. I am having a problem where I can successfully connect to the Beevou site but I cannot see the coupons. The services page is configured as
https://beevou.net/api/vouchers/get_u...

when I do a test I get the following result
{
"total_items":0,
"total_pages":0,
"items":[

Code: Select all

 ], 
 "user_id":null 

}

The results I should be getting should be with more details about the coupons I have created.
According to the Beevou documentation I should add parameters but I don’t know where to add them on the appery platform. Here is the sample cod
public JSONObject getMyVouchers(int orderBy, int searchType,int page){
List params = new ArrayList();
params.add(new BasicNameValuePair("tag", "getMyVouchers"));
params.add(new BasicNameValuePair("orderBy", String.valueOf(orderBy)));
params.add(new BasicNameValuePair("searchPage", String.valueOf(page)));
Log.e("ORDERBY", String.valueOf(orderBy));
Log.e("SEARCHTYPE", String.valueOf(searchType));
params.add(new BasicNameValuePair("searchType", String.valueOf(searchType)));
JSONObject json = jsonParser.getJSONFromUrl(https://beevou.net/api/vouchers/get_u..., params);
return json;}
How do I configure this on the Appery platform?

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Unable to see coupon information

Hello Mark,

1) Please open your service
2) Open the request tab of the service
3) Open query string if it is GET method of service or open body if POST
Here you can add each parameter and try to test one more time

Mark7294305
Posts: 0
Joined: Fri Dec 26, 2014 2:10 am

Unable to see coupon information

Hello Evgene
I have received the following reply from the Beevou support team

You should see your user data, if not, your client is not sending cookies to the Beevou server.

"Standard CORS requests do not send or set any cookies by default"

In order to include cookies as part of your request you must specify your client to do it (withCredentials = true; in javascript).

Can you help?

Mark7294305
Posts: 0
Joined: Fri Dec 26, 2014 2:10 am

Unable to see coupon information

Could anyone else on the support team help me?

Ihor Didevych
Posts: 0
Joined: Wed Nov 19, 2014 7:55 pm

Unable to see coupon information

Hi Mark,

We are working on it.
I will let you know when have more information from developers team.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Unable to see coupon information

Mark

If you use jquery instead of services please try the next property for ajax call
prexhrFields: {
withCredentials: true
}/pre
example:
pre$.ajax({
url: a_cross_domain_url,
xhrFields: {
withCredentials: true
}
});/pre

Mark7294305
Posts: 0
Joined: Fri Dec 26, 2014 2:10 am

Unable to see coupon information

Hi Evgene
I am a bit confused. You said not to use the services but to use a JavaScript instead to connect to the URL. The method I am used to is:~

  1. Create and configure an Appery service with the url

  2. Do a test

  3. Import the results

  4. Map the required fields to my app

    You said not to use the services but to use a JavaScript instead. So what are the steps I would need to take to:~

    See the results
    Import the results
    Map the required fields to my app

    Mark

Mark7294305
Posts: 0
Joined: Fri Dec 26, 2014 2:10 am

Unable to see coupon information

To obtain the coupons require 2 steps:~
1.I must obtain a session key with the following url
https://beevou.net/oauth/token?grant_...

  1. I can access the coupon information by using the following url
    https://beevou.net/api/vouchers/get_u...

    So I want to:~
    See the results
    Import the results
    Map the required fields to my app
    Mark

Mark7294305
Posts: 0
Joined: Fri Dec 26, 2014 2:10 am

Unable to see coupon information

Could anyone else on the support team help me today?

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Unable to see coupon information

Hi Mark -

Unfortunately it's not very clear at this point what is works for you in Appery.io and what you have tried and what's not.

But first you need to know if Beevou supported REST connections or does it needs a JavaScript implementations for authentications methods, storing sessionTokens and so on.

As I can see you've mentioned in the link above Aouth token, you can start from here: http://devcenter.appery.io/documentat...

And check our section about how to connect 3rd party REST APIs here - http://devcenter.appery.io/tutorials/...

Return to “Issues”