How to poll live session SkyScanner API - skyscanner

I successfully create the Live Pricing Service Session and have the polling URL. I am trying to poll the URL with a GET according to SkyScanner docs, but I keep getting the following 400 error:

If you really successfully created the session poll URL. All you have to do is to add the apikey at the end of the session poll URL like this:
Session Poll URL:
http://business.skyscanner.net/apiservices/pricing/hk1/v1.0//?apikey=

Related

How to change data after success URLs sent to partner API's if they can only be GET requests?

A lot of times there's a parameter in a partner API endpoint like success_url where you provide the partner API with an endpoint on your internal API to redirect the client.
For example, on Stripe you can create a checkout session using POST /v1/checkout/sessions. In the body you send Stripe a success_url. You redirect the client to Stripe where they make their payment. After they complete their payment successfully, Stripe will redirect the client to that success_url you included.
Since you are only sending a URL aren't all of these requests only GET requests? And if so, a GET is defined in the HTTP protocol as idempotent and safe. So I couldn't use this request to make changes to data on my server. But after a successful purchase, I will want to make changes like updating or creating an Order on my server, updating stock left for the Item, etc.
How can I make changes after these success, refresh, return, or cancel URL's if they are all GET requests?

Preserve asp.net Session Data on Authorize.NET webhook response

I am trying to upgrade Authorize.NET from CIM to Accept Hosted, and stuck on this problem:
Authorize.NET Accept Hosted needs 2 urls for the configuration.
Return URL, which redirects the user to home page, after a successful payment.
A webhook url, to which the Authorization.Net webhook will post transID.
On redirect, I need to access application specific payment details, which are stored in the current session. Note: These are not the authorize.net payment details, I can get them from webhook->transID->GetTransactionDetails
In CIM, the redirect url contained the Payment information from AuthorizeNET(transID, etc.), as well as the app-specific session Payment information. So I was able to process both of them in a single handler, which was called on the redirect.
However in the new api, when a webhook sends post data on my webhook URL, it does it asynchronously, using a different session than the session on which payment was made.
So when I receive transID and subsequent payment details from AuthorizeNET, it has no idea about the session dependent application specific payment details.
My question is, how can I preserve the session-specific data, after I receive the Authorize.Net's payment details?
Has anyone encountered a similar problem? What's the best approach to fix this?
You can't maintain a session across systems so you need an alternative way of storing that data and retrieving it once the user returns to your site. A common way to do this is to persist that data in a database and storing the identifier for that data in a cookie or in a custom field that Authorize.Net will pass through for you as part of the transaction and returning redirect. In this case the return URL you pass in hostedPaymentReturnOptions.url can containa query string with that identifier (i.e. https://www.yoursite.com/return_url?id=12345). Then once the user returns back to your site you can use that identifier to retrieve their session data from the database and add it back into their session.

Payu not returning to website after successful transaction

I have integrated payu payment gateway in my ASP.NET application.
Everything is working well, except it is not returning to the website after successful transaction. What could be the issue?
There is an issue or you forgot to pass the Success URL in payment transaction request. This will return the user to your site after successful transaction.
Make sure to pass these below parameters.
Success URL
Failure URL
Cancel URL

Meteor: Handling Instagram Realtime API Requests via callback-Url with iron-router

I'm trying to use the Instagram Realtime API with a Meteor app. Basically you can subscribe to a tag get latest posts.
So I need to setup a callback URL and send a post request with my callbackurl, the object & fields that I want to subscribe and a verify string. A Instagram server is sending a get request with my verify string and a random string (challenge) and the Meteor server has to respond to this with the challenge string.
I'm getting the following error serverside:
error_message: 'Challenge verification failed. Sent "b58b60bb367d40148defa4e6240b2dc2", received "<!DOCTYPE> html..."..etc
In order to verify the subscription, your server must respond to the GET request with the hub.challenge parameter only.
How do I respond to instagram API with the hub.challenge parameter.
Resources:
http://instagram.com/developer/realtime/#

OAuth Callback Session

I'm having a problem figuring out to maintain the same session after I get the oauth callback in a servlet. Since th callback come from Twitter and not the clients browser, I get a different session.
Can someone help??
Without knowing about servlets, I offer three pieces of generic advice.
1 - start a new session when you get the OAuth callback.
2 - store a Session Id in a cookie and retrieve later
3 - the OAuth token begins with nnnnnn-XXXXX where nnn is the users twitter Id.
Hope this helps.
You can also provide additional querystring parameters in the callback url and they will be provided when the user returns from authenticating.
I encountered this issue in my development environment, where my callback URL was different from the URL I was accessing my local application from.
So, if the callback URL is http://myapp.apps.com, you should start accessing your application via the same URL (configured via /etc/hosts).
Some further details are available in this post.

Resources