Webhooks for Amazon MWS - php

I am just going through Amazon MWS documentation and have explored their PHP Client Libraries.
It seems that for every section they have provided a separate SDK. I wonder if there is any compiled API so that we can just include it in our project and use.
The main concern i have is for instance i somehow managed to list my products to Amazon using MWS API. Now how would i know if there is any order recieved. I want to integrate it in my system that every time a new order arrives i should be get notified of it without manually calling the ListOrders. Do they have any sort of Webhooks ?

At Webgility, we've been integrating with the Amazon MWS APIs for half a dozen years or more now. They are unfortunately not as easy to work with as one might hope. Data volume is throttled, a complete information set requires multiple calls, and to answer your question: there are no Webhooks we're aware of.
We're helping ecommerce sellers process hundreds of thousands of Amazon orders a month (sometimes per week), but are still dealing with the API issues you're coming upon.

You might have a look at the Amazon MWS Subscription API.
https://developer.amazonservices.com/gp/mws/api.html?group=subscriptions&section=subscriptions

Related

How do I onboard a submerchant in Braintree? [PHP SDK]

In PHP, I am developing an application that is going to use the Braintree Marketplace functionality - for users within my platform to be able to handle escrow transactions for projects they post. I understand the code on how to do actual transactions, but I am having issues on the sub-merchant process and where that necessary code is supposed to go.
I have looked extensively on how to onboard sub-merchants with the code from their documentation, but where am I supposed to put all this? On its own separate page? The only coding example is the very basics here on Github. I need to be able to create these sub-merchants so that I can test escrow within their Sandbox.
It turns out that what I was trying to do was a limitation of Braintree itself. At that time, you were not able to test escrow transactions within their Sandbox. Not sure if that has changed over the past year.
For those looking for a much better payments API, check out Stripe instead.

In need of a Push service for Laravel mobile app

I am building an iOS/Android app using Laravel as backend and now I need a push service.
I need to push out two types of notifications, when the app is running/background and one when its closed.
I dont mind using two types of services, I mostly want one that is easy to implement into Laravel.
I have already looked at Urban airship, but it seems hard to implement this with Laravel - Might just be my mad skills.
Pusher, looks easy to implement with laravel, and can only handle in-app/background pushes. But their smallest plan only support 100 connections which seems a little. - 100 logged in users?
Parse seems to work, but if I understand their api I also need to log users into parse's API.
So please share your experiences on push services using Laravel.
in-app
Pusher allows 100 users connected simultaneously. So if you unbind the channel on appstate going to background, you should be fine up to 400-500 users (in my case, I had 2000+ users before I had to upgrade my account to startup). You can find out more about their pricing plans here: Pricing Plans
background
Parse: as of writing this, their status is "service is now shut down".
Urban Airship: I found their library the easiest to implement, and they have a ton of customization that you can apply to your notification (including notification actions).
All that being said, I had a hard time finding a library to for laravel to push the notification for Urban Airship. The only one I found is php-library2, but it's not supported any more, so use with caution.

Gaining access to Amazon FBA database

I have more of a conceptual question here, but I think there should be a clear answer. I have a client who sells products using the "Fullfillment by Amazon" service. I am creating a Wordpress site for him to sell his products - and I am wondering what the easiest way to gain direct access to the Fulfillment by Amazon MySQL database would be. I know PHP/MySQL well...but I have never set up a retail site like this using Amazon services.
I did some googling - and found an old project called tarzan-aws, which has just turned into the AWS SDK now. But it looks like if I wanted to use that (if that is what I want to use), I would need to have a database hosted by Amazon AWS...and I already have a hosting service that I like (inmotionhosting.com). Is there a PHP API I could use to link the site to Fullfillment by Amazon? Maybe a Wordpress plugin? I logged into my clients FBA account and it doesn't seem like there is anyway to get the info I would need to set up a working automated PHP/Wordpress backend.
You need to use the Amazon MWS API. They provide a guide, Amazon MWS For FBA Sellers, along with client libraries in PHP, C# and Java. You will not interact with a "database" as you have described; you will interact with a web service.

Quickbooks Desktop to send information through REST API

Very shortly I will be required to do an integration between Quickbooks Desktop and a PHP website. I'm aware that there exists a PHP QuickBooks class that helps with integrating, but to my knowledge that only works when the PHP site is the one to initiate contact with the Desktop application. It's required of me that when a Purchase Order and/or Product is created on QuickBooks, it will automatically (and instantaneously) send the information over to my website using a REST API. Considering there will be multiple instances of QuickBooks Desktop that will be connected (we will allow customers to use a QuickBooks application that we will build), it is not practical to have to constantly check if ALL of those QuickBooks Desktop instances have any new Purchase Orders or Products that have been created since the last time we checked.
Is there a way to somehow add code to QuickBooks to send Purchase Orders and Products (upon creation) to my website using a REST API?
Thank you
QuickBooks itself doesn't really have any reliable method of catching events like you're talking about, and also doesn't have any way to then relay those events to an external REST API. So, you're not going to find exactly what you're looking for - it isn't possible.
With that said, you CAN get close by having an external application that polls QuickBooks periodically (as often as every few seconds) to grab new data from it, and then relays that data up to your REST API.
The easiest way to do this is via the Web Connector. It can poll as frequently as 1 minute, and is very capable of doing exactly what you're talking about. If you want to go with the Web Connector, your best bet is probably this open-source QuickBooks PHP DevKit (disclaimer: I'm the author). You could start with the Web Connector quick-start guide.
The harder way, but more flexible way is to write a custom QuickBooks SDK application that sits alongside QuickBooks, polls QuickBooks periodically, and relays that data up to your app. If you want to do this, you should check out the QuickBooks SDK - it has some C# and VB.NET examples in it which should prove useful.
Some specific notes:
but to my knowledge that only works when the PHP site is the one to initiate contact with the Desktop application.
Actually no - it only works when the Web Connector (which runs alongside QuickBooks) initiates the communication. But you can set it to run every 1 minute, which makes it pretty much constantly run and push data up to your app.
it will automatically
This is easily do-able with either the Web Connector or a custom SDK app.
(and instantaneously)
This isn't do-able. QuickBooks isn't even fast-enough performing to instantaneously relay data. You will never get instant data transfers from QuickBooks, so just forget about it now. (This is especially the case when you realize that there are lots of things in QuickBooks that can completely lock integrated applications out of even connecting to the data file - single-user mode, QuickBooks automatic updates, QuickBooks not being running, too many users in QuickBooks, etc.)
send the information over to my website using a REST API.
If using the Web Connector, your website receives the data, and you can then transform it and send it to your REST API.
If using a custom SDK app, you can write custom code to do that no problem.
it is not practical to have to constantly check if ALL of those QuickBooks Desktop instances have any new Purchase Orders or Products that have been created since the last time we checked.
Are you sure? We do this every day for thousands and thousands of people on ridiculously under-powered hardware.

Programmatically Settling a request by Amazon's REST API

I am (developer) using amazon marketplace payment for transaction. For this i am using marketplace fee enabled button (http://docs.aws.amazon.com/AmazonSimplePay/latest/ASPGettingStartedGuide/nomktplc.html).
I want charge a sender's card at a later point so I am using settle (advance feature of amazon marketplace fee enabled button). To settle the transaction I am trying to use this (found at http://docs.aws.amazon.com/AmazonFPS/latest/FPSMarketplaceGuide/Settle.html)
" https://fps.sandbox.amazonaws.com?Action=Settle&AWSAccessKeyId=AKIAIOSFODNN7EXAMPLE&ReserveTransactionId=14GKD9GE66FAA63E6O6B2JDPZKN53LZ7F22&SignatureMethod=HmacSHA256&SignatureVersion=2&Signature=SJJLsIBghi7VIycBjX7c3hnfgZ%2FBvZbzqLtAZXDL8ys%3D&Timestamp=2009-10-06T07%3A53%3A11.750Z&TransactionAmount.CurrencyCode=USD&TransactionAmount.Value=1&Version=2008-09-17 "
My question regarding this request is
How should I use it.
From where should I call this - the browser or as a normal api call.
If it is done by api then what steps should I follow?
I made this call directly from the browser but it is always showing
'SignatureDoesNotMatch' error.
Please suggest what i should do? Any help will be highly appreciated.
The Amazon Simple Pay solution you are using gives you a very simple HTML integration. The browser does the magic here.
The Amazon Flexible Payment System (FPS) however is an API which is designed to be used by server side code (even though it could be used by JavaScript). You will have to create and properly sign requests to automate this integration. This is considerably more complex than just putting an ASP snippet into your page. I suggest you start here:
What Is Amazon FPS <- good starting point
FPS Sandbox <-- a browser playground for FTP calls

Categories