PayPal api: How to get orders of user by users email? - javascript

I want to give some benefits on my site to users who made an order or have active subscription with my merchant account.
I have nodejs server but cant find the way to query paypal for list of orders of my merchant account.

PayPal would recommend you keep your own records of orders placed by a user; they are a payment processing service, not a data service, and do not want you querying their servers for this type of information.
They do offer downloadable activity logs in the www.paypal.com account interface, which can be obtained in .csv format. But that is for accounting and reconciliation purposes, not something you would want to run a script against.
Basically, you really ought to keep track of your own users' orders and active subscriptions if this information is important to you.

Related

How do I get my flutter firebase user to also create their stripe account

I am creating a mobile marketplace however, I don't know how to allow my user who has created an account with firebase also create a stripe account and having that connect to my app so that when they create a listing for a product, they can receive money in their stripe accounts after someone buys their specific product.
My question is, does anyone know how I can do that? I tried following the stripe instructions but realized that they are only making an account and after they sell an item, they arn't getting payed. How would I program that? How would they get payed? For firebase functions, I am using Js. My mobile app is made using flutter and my backend is firebase.
You can make a payout system "add to each user a field which holds the total gained money and when this user collect a specific amount you can send money from stripe to his bank account" because it's not right to connect each user with Stripe as it or any other payment gateways allow to connect the app with one account and it requires some information to be able to receive money .. etc , you see that you put private key and other key to connect with stripe and those keys and you should hide'em with env properties so no one can see'em
I hope you got what i want to say
Stripe Connect has a 3 different charge types to select from : https://stripe.com/docs/connect/charges
In general, you would either create the charge on your platform then transfer the funds to the connected account, or create a charge on the connected account. You would want to follow one of the two guides below depending on which charge type [0] you choose :
https://stripe.com/docs/connect/collect-then-transfer-guide
https://stripe.com/docs/connect/enable-payment-acceptance-guide
Following the flows mentioned above, funds will accumulate in the connected account's balance and will be available to be paid out. You can read about connected account payouts in more detail here : https://stripe.com/docs/connect/bank-debit-card-payouts
You would probably want to write in to Stripe support if you need further guidance on how Stripe Connect works as a product.
This documentation provides detailed steps on how you can
process payments with Firebase using a stripe account.
It walks you through customizing and deploying your own version of
the open-source cloud-functions-stripe-sample.web.app example
app using stripe payments whose source code is available at this
GitHub link.
Also have a look at this stackoverflow thread where a
stackoverflow user has shown how he has integrated Firebase with his
stripe account using Firebase functions.
For a detailed description on how you can create a stripe account for
Firebase Flutter, go through this article.

Use Firebase and API keys to authenticate paid Shopify website themes

I'm trying to use Firebase as an authorization method for a paid Shopify website theme. The idea is the store owner purchases and downloads the theme files, and after purchasing also creates a firebase account with an email and password. Then an API key for the theme will be emailed to them. Once they have the API key they will input their account email and API key into the settings within the theme files. To authenticate the user the theme files will have some javascript that checks if the username and password inputted correspond to a existing user in the firebase database. If the email and API key inputted does not match to any user in the database then the user will be redirected to an error message HTML file, or get an error message popup that they cannot close saying to input the correct key.
Another possibility is to use the firebase firestore unique user ID instead of generating user API keys. Maybe this way there would be no need for using the firestore database.
Either way, this logic seems ok if it was a single user. But since it is a website theme file it is possible that every users website will get thousands of customer visits per day. Thus every customer that visits the clients site will trigger an authentication check with firebase with the clients email and API. So every user account on Firebase could potentially have thousands or maybe even hundred of thousands of logins and database queries everyday (depending on how popular their website is). So this is the part Im worried about.
Anyone have similar experience using Firebase for website theme authentication? Perhaps I am going about it all wrong here. Or maybe Firebase is just the wrong tool for this job.
Appreciate any input!

How to get corresponding user information - FireBase

I am new to firebase and I need some help with something.
I am creating an application which allows users to post tasks. When a user saves a task their uid is sent to the database along with the task information. In my database I have a separate child for users which contains all of a users information, i.e name and other stuff.
When my app starts I want to pull all tasks from firebase and according to the uid saved with a task, I want to pull the user information corresponding to that task so that I could set correction information on the cards.
I need help achieving this, thanks.

linking an object from one data service to another data service

i have a project i am working on
the requirements are to build a service to manage customers
the service has the following functionaltiy
Create Customer
Find Customer by Id
Update Customer
Delete Customer
each customer has and id, Name, Email, Address and related credit card tokens
When Customer is created it can be linked to one or more credit cards
and when updating a customer it can be linked to a credit card
The Credit Cards are managed in a different service (one that is not built by me) that i know nothing about (can make some assumptions)
The service i built is a web api project with an sql server database
i used asp.net entity data model for that and i implemented all of the CRUD operations using the rest api
my question is how can i create the link between the 2 services to allow me to link a credit card from a different service to my customer.
the requirments are that if some one wants to view the data of the credit cards it will need to use the other service so i dont need to have access to the credit card data, only to allow to link a credit card to a customer
any ideas on how this can be done?
Unfortunately your question is a little ambiguous and, after reading your comments, it seems your question is essentially asking how to "link" to a different service, which does not exist. If you don't know anything about the other service (and certainly if it does not exist), it will be very difficult to help you "link" to it.
You mentioned that the other service may be developed. In that case, I can suggest the following:
Connect to the underlying database that the external information is being stored in, much as you are connecting to your own database now (see connecting to databases in mvc for more information)
If you are not granted access to the external database, you will most likely utilize some form of web service to make queries against the external database (see consuming web services in mvc).
From your backend, the logic basically goes: access their database or call their web service, get the id for the credit card and either pass that id through or generate your own (internal) unique id for a credit card (and creata a separate table that stores the original id as well) and associate that with your customer (in an array or object, etc). That way, when you need to retrieve credit card information, you have your customer entry with the information (id(s)) of any associated credit cards. You can use that information to query from the external service to get the required credit cards and then combine the information

PayPal Merchant API - Getting Products Information

New to using PayPal, and had a general question regarding what it can provide.
The need is to enable someone with a merchant account on PayPal to login to a website (meaning the api should probably be in javascript) and then get from the API information about the products the merchant supplies.
Does anyone know how this can be done?
Sincerely,
-Lior
PayPal doesn't have any way to store actual inventory data. If you process orders with item details included then you pull those details using GetTransactionDetails.
If you're using the Button Manager API you could create individual buttons for different products with inventory tracking enabled on those and then you could potentially pull "inventory" data by pulling the buttons. I wouldn't recommend that, though.
Really, the best thing to do would be to manage your inventory in your own system of some sort.

Categories