How can I integrate the Amadeus API with my Laravel web page? - php

I need integrate the Amadeus API in my Laravel web page, because I can't find how can integrate this, I have learned some documentation for work in PHP, in other cases work in Laravel but no necesary with Amadeus, but with SOAP, I need to do this integration, Could you help me? please!

There is a PHP library to integrate the Amadeus Web Services SOAP interface in a PHP application. It sounds like what you need: https://github.com/amabnl/amadeus-ws-client/
Although this library doesn't provide any ready-made UI or any integration with Laravel, it is a composer package that can be included in any PHP composer-enabled projects easily. It does all the heavy lifting of session handling and creation, sending and receiving of SOAP messages.
I suggest you check it out, start with reading the Getting Started docs: https://github.com/amabnl/amadeus-ws-client/blob/master/docs/about-get-started.rst

If you want to integrate SOAP with your laravel application, you can use this package: https://github.com/artisaninweb/laravel-soap and just follow Amadeus API documentation.

Related

LTI Platform implementation in PHP, especially in laravel

I'm researching LTI Advantage implementation for my platform built on Laravel and vue js, but I'm having a hard time finding a step-by-step guide on how to implement LTI both as platform and a tool, the official implementation guideline only mention some specification and terms without telling the flow or what I need to provide (endpoint, function or something else) as a LTI Platform
I currently trying to look at what moodle does on handling LTI, but it's so difficult, again, I cannot find how the LTI flow, what data I should save and use, and so on
I've tried https://oat-sa.github.io/doc-lti1p3/ but I am still confused about step-by-step implementation, what should I do as a tool provider, what endpoints need to be provided, and so on.
I see moodle gives a lot of endpoints such as:
mod/lti/token.php (token endpoint)
mod/lti/openid-registration.php (registration endpoint)
mod/lti/certs.php (jwks endpoint)
mod/lti/auth.php (authorization endpoint)
and for LTI registration and launch, moodle has:
(registration url) http://example.com/enrol/lti/register.php?token=xxxx
(tool url) http://example.com/enrol/lti/launch.php
(initiate login) http://example.com/enrol/lti/login.php?id=xxx
(jwks) http://example.com/enrol/lti/jwks.php
(deep linking) http://example.com/enrol/lti/launch_deeplink.php
I don't know what those endpoints do, is it required to run LTI Advantage, and how to make them using that library.
thanks in advance guys for helping me
I have experience from the tool provider side. I would look at using the celtic-project/LTI-PHP library for this. You should be able to import this and get it working with Laravel and vue.
This should have some information on using it as a platform.
https://github.com/celtic-project/LTI-PHP/wiki/Messages
You can view the LTI core specs here:
https://www.imsglobal.org/node/162741

Magento Third API integration

What is the right way to integrate third party api in magento . Logistic API integration is provided , but need help with the right process to make it work.
Thanks in advance
Assuming that you want to consume an external API from Magento this would be the correct structure:
For Application related logic create a Module in local namespace
(/app/code/local/(vendor-name)/(module-name))
Enable your Module with an xml in /app/etc/modules/
Put your Api related libraries or logic under /lib/
Make use of Api libraries in Models under
/app/code/local/(vendor-name)/(module-name)/Model
UPDATE:
I found a sample Magento 1 Module on github, that simply consumes google weather api.
https://github.com/careys7/Magento-Weather-Sales
An alternative solution could be, especially when trying to integrate an API that's not directly supported by Magento, to use flowground. It offers flexible API integration for thousands of APIs with dedicated connectors, e.g. Magento 1 and Magento 2.
Check the list of integrated connectors and GitHub for the list of available Open-Source connectors.

Laravel 5 and Quickbooks

I'm trying to integrate the Quickbooks Online API into Laravel 5. I've got the code working outside of Laravel using the Consolibyte package. But its written in what I'll call a classic PHP style - meaning there are a number of REQUIRE_ONCE files etc. I'm sure I can crank through and integrate it all, but in the interest of saving time, I'm wondering if anyone else knows of a package for Laravel 5 which already does this?
Ultimately I need to be able to create Customers, Vendors and Invoices. Don't really need the rest of the functionality that the Consolibyte package uses (which is a great package by the way).
If you're using this code:
https://github.com/consolibyte/quickbooks-php
You only need to require one file. There's no real work required to get this working in Laravel. Just do this in your Laravel app:
require_once './QuickBooks.php';
And you're done.
For anyone else looking to solve this problem, this obscure blog post will save your life. It's a lot to post here, but he essentially uses the consolibyte/quickbooks-php, but wraps it up in creamy Laravel goodness so you can see the "under the hood" objects you need to set up so that you don't break the framework.
I followed the instructions, with some alterations for my app, and it authorized first try (Laravel 5.2).
It's not perfect, but it's as clean as you can get for Laravel right now.
Major props to both the article writer Pawan and the package author Keith Palmer Jr!
You can use this one instead its fully enabled to be installed by composer in Laravel or Yii2. I installed it in Yii2.
https://github.com/beanworks/quickbooks-online-v3-sdk install quickbooks from this url and then use the below url to implement oauth
https://github.com/IntuitDeveloper/oauth-php
You can easily make routes for oauth steps involved and there are samples in the later repo which can be used to learn how to post and query objects from quickbook.

Secure Web services with Oauth in PHP

I want to implement Oauth to protect my PHP Web Services,i have been following this link but found that some of them link are not working.And the working example had implemented in slim,flight some different frameworks in php and i'm newbie in it.My problem is i want to implement Oauth in Codeignter framework to protect Web Service and as per oauth site i've got a link by Alex Bilbie which is deprecated and not working. So if someone had done this before in codeigniter please let me know , Simple PHP would be also fine, later on i can modify it to fit in codeigniter.
I find Brent Shaffer's OAuth2 Server Library for PHP an excellent library!
In the cookbook you can find many examples on how to integrate it into certain frameworks, unfortunately CodeIgniter isn't one of them. But the documentation is very good, and you can use the cookbooks on the other frameworks as a guide for doing it in CodeIgniter.
You can find the library on Github.

Adding REST API to existing PHP website

I'm using some open source code to launch a game. The game is old, around 11yrs. It is a tick based web based game. It's written in php and using MySQL. Basically I want to port this game to ios, instead of using uiwebview I want to build native controls.
I know that it's bad practice to communicate directly with MySQL from an ios app. So what I want to do is add a RESTful API. I'm new to this and have scoured google for answers, does anyone have any pointers of where to start when adding an API to an existing site? It's quite a complex structure.
Thanks.
Paul.
My suggestion is using a framework that is guided towards building an API. I use Slim Framework for my API back end and it's pretty easy to use. If you create a separate URL for this API or include directly into the PHP project as a class it could work.
Some tutorials to get you started are
Say Hello World with Slim
RESTful services with jQuery, PHP and the Slim Framework
Writing a RESTful Web Service with Slim
Hope this helps,
Wes

Categories