How do I create a charge on a Stripe customer from a connected account - swift

I'm creating a type of ride-sharing application for iOS using Swift and Firebase Functions and would like to implement the following workflow:
Passenger requests ride from specific driver
Driver has 2 options
a. Driver accepts and the passengers card is charged
b. Driver declines and thats it
I've gone through pages and pages of Stripes documentation and Github to find the best example to go off, but can't seem to find one that fits what I'm after.

You can find an example here: https://stripe.com/docs/connect/collect-then-transfer-guide
There's also https://rocketrides.io/ which is a complete example, including code, of a ride sharing app.

Related

Accessing Walmart API and setting up product mapping

To start: I'm completely new to working with APIs, so please bear with me.
My first question is related to getting access to the Walmart API. I see the example code to generate time stamp and signature. How do I run this file? I've looked at YouTube videos, the Walmart tutorial, and other posts in this forum and am still a little stuck.
Second, I'm guessing this file needs to be included in the actual application to continue to be able to access the products?
Third, my goal is to map only a subset of the product catalog for users of the app to view. Let's use 'soda' as an example. Is it the Taxonomy API I need to use? And how do I limit the available products a user can search?
Note: This will be implemented in a Flutter application, if it makes any difference.

How to get the Google ad manager impression of a placement using api (PHP)?

I am able to connect with my ad manager account using Google Ad Manager API (https://github.com/googleads/googleads-php-lib/tree/master/examples/AdManager). I am getting data i.e all companies, all placement on my command line. But confused on getting impressions.
How to get an impression of a placement?
First, you will need a query. Using the UI is the easiest way to build a query, and see the results. Here's the guide from Google to create a query on the UI.
Then, you will save the query and follow the ReportService/RunSavedQuery.php example to download the impression report in your program.
Please note that the examples are removed every 4 quarters and replaced by newer examples. So, if the example link above doesn't work, the example might have been replaced with a newer one.
This question is not a PHP specific question. Indeed, it is a "how to use the product" question, and is best suitable to be answered on the Google Ad Manager product forum. If you raise a question on the forum, the support staff may get back to you on a secured channel to help you build the query.

How to connect sensor devices to IOTF using API KEYS

I am doing an android application, I'd like to know how to connect sensor devices/applications to Bluemix IoTF using API keys, by saying that I just want to minimize the registration task from client side(sensor devices)as much as possible. I know how to register devices with deivce Id,token and authentication manually. but I just like to know that is there any other easy way around to do it. It would be great If I got some one shed light on this from scratch. Thanks in advance.
There is a rich set of REST based APIs available at:
https://docs.internetofthings.ibmcloud.com/devices/api.html
and fully documented here:
https://docs.internetofthings.ibmcloud.com/swagger/v0002.html#/
One can use excellent REST based testing tools such as Postman for REST testing.
The reason I mention the REST APIs is that they provide a way for scripting or automating the registration of devices. There is an API called "Add device" that, when called, will register a new device instance of a specific device type against your IoT Foundation instance.
I could imagine a new device that knows it is not registered executing a self registration request to define itself as a new device type. What I would next suggest is that you read the links above and see if they make sense. If they answer your question fully, great. If not, simply post a new question that is specifically targeted at a specific areas and we'll be watching this set of tags and respond back as quickly as we can.

REST API Flow and Email Templates

Business Model:
This business makes handmade specialty items from a large inventory of photo examples on the web site. The owner does not want to bill until the item is ready to ship.
I'm sure the business model itself can keep us debating for days, but please do not question his approach as that is not really the point here. It is simply how he wants to run his business.
Design:
I have developed a system for him which manages his transactions (no financial information) until he is ready, whereupon he selects the transactions by checking the ones he wants from a query-select-list of unprocessed orders. I can then convert each ordered item to an HTML stream, REST objects, or whatever. The customer should receive the invoice email and click on a button to take him to PayPal for payment.
I want to use the REST API object model to send all the required information to PayPal, describe the invoice and then send the email/invoice to the customer via the API. It is not uncommon to have multiple items ordered at once.
Q1 - The API looks like it supports this usage but can anyone experienced with its use tell me if there is a show stopper I have not discovered yet?
Q2 - I have already developed an HTML template for this purpose. Perhaps prematurely. Does REST API allow for the use of templates? I do not see how yet but hoping there is a way.
Many thanks.
2K
After some more research and a half hour with Integration Support:
A1: There are no show stoppers in the scenario described above. The REST API (and PayPal) supports the usage I have in mind. If anyone desires I will post back results in a few days after code complete and a bit of testing.
A2: I was informed that my own HTML templates are supported but I still do not see how. With the spirit of "Trust, but verify" I will continue with my efforts and ask for Integration Support at that point if I need it.
My cup and my Stack both overflow. I am fortunate.
2kTech

Calling cards iPhone application

I am newbie to iPhone development, I want to do a kind of POC which fulfill the following requirement.
It will be basically a calling card application where user will enter a toll free number followed by pin number. After entering a pin no. it will show the available contacts from the iPhone itself, user will select a desired destination number and call it.
I know this is a whole new native application, but can anyone guide me how I can start working on the same. I have collected a few information about what calling card is and how it works. I'm a bit confused about how can I get the information from calling cards service provider?. Do i need to call there API and how to do a code in the XCODE tool?
Please help me in this regard.
A quick google of calling card api's shows that most card companies have them, but they also don't publish them. Looks like you'll have to talk directly with them and get api specs. It may cost you? I'm guessing the actual API won't be very complicated... a couple of HTTP requests and a little bit of response parsing. You might want to look into asi-http-request for building the requests, and you can probably do most of the response parsing with NSStrings or NSXMLParser if they use XML.