I'm creating a rest api for a new web system. The api is made using the laravel framework, and I've also created a client application which is a separate laravel site. The client just uses guzzle to connect to the api, I've done it like this because we will eventually have an app connecting to the main api.
The issue is that the php sdk for braintree payments doesn't directly support laravel very well, and the laravel cashier site seems to be for taking payment on the same website.
I'd like to know if anyone has done this before? How would you setup the separate laravel site so that it can take payments in some way via the rest api?
Related
Recently assigned to a new project where we need to build a api centric web application. Requirement is to build 2 separate projects in Laravel one the has all API's that can be accessed by either web or mobile applications(for future purpose) and other is a web application that uses the API's to work almost all of its function.
Building an API project in Laravel is a easy and lots of tutorials are available about using passport etc. But how do i implement that API to web application.
My major question is how do i setup authentication for web application using api, because its default authentication is model based, or my approach is wrong?
Please suggest ideas, because we are currently in planning phase.
Thanks in advance
Each Laravel Project will be identified as it's own "site" so the only suggestion I would have is if you plan to invoke your APIs via AJAX calls to be wary of Cross-Domain Scripting issues.
I've been task with building a service provider using Aacotroneo library (a wrapper for Onelogin). The documentation on both project lack code examples of how to make a login page, and how to make actual request to the Idp. Has anybody created a service provider using Laravel 5.2, angularjs and aacotroneo?
Review this laravel-saml-sp-demo project. Is not angular, but a working example of lavarel - saml integration.
I'm currently working on a CakePHP 3 application, trying to connect to Microsoft Azure using OAuth2. To this end, I'm trying to integrate the UseMuffin OAuth2 plugin. However, I'm struggling with the documentation. It seems to describe how to configure the plugin, but not how to actually use it. What methods do I call and how when I want to initiate an OAuth2 authentication? I'm somewhat familiar with OAuth2 itself, already wrote a little stand-alone PHP script that successfully authenticates using Curl. I'm just not sure how the UseMuffin plugin can help.
To be clear, the CakePHP 3 application I'm working on already has its own authentication scheme. I just want some users (not all) that are already authenticated with my application, to connect with Azure, so we can exchange information. I'm not sure the UseMuffin plugin can work alongside an existing means of authentication?
How will I put two apicontext in my system? I already made a paypal rest api sdk in my system and it is running properly, Now I need to put another paypal account but I dont know how will I put it. How will I do this in laravel?
I am building an application and currently focusing on the mobile part .
I wanted to use Lumen microframework for the server-side and Apis to connect to the mobile app.
However i also wanted to extend the application later on to build a website (Laravel)
They will both be using the same database .
I am wondering whether i should use Laravel directly and make it responsible for the apis too (albeit it would be slower for mobile apps)
Or i was wondering if i can use a combination of both.
Lumen - to deal with server requests e.g : api.site.com/...
Laravel - to deal with the website e.g : site.com/....
You could do either or, but I would suggest keeping the website and the API isolated.
I actually just finished up a similar project.
I have a mobile app built on Ionic, an API built on Lumen and an admin CMS built on Laravel. The CMS updates content in the API via authenticated API calls and then the app pulls from it.
If you take this route, you could make API calls from the CMS/Website using client side or server side requests. My CMS uses server side calls leveraging Guzzle.
I would suggest looking at sharing models between the two applications such that you don't have to update content via API calls. Here is a nice article on how to do so.