How to make payment to store business account byu paypal? - mobile

I am developing an mobile app where I present products (items) from different stores just like ebay.com. User can select product, can add to cart and then finally can make payment via paypal.
I have created an Paypal business account on sandbox. Currently all payment made by users are coming to this business account I mentioned in my code. But my requirement is different. I want that payment should go to store's (product owner's) account.
So I made changes so that whenever i make call to paypal I chnaged business account email to store owner email address and payment done successfully. :) Payment posted to store owner business.
I made changes only in paypal.recipient email address but still paypal object is created by my paypal application ID. This is what I am worried about. Does it will work on production mode? I really doubt that.
Please help me guys!!!

What API or service are you using to do this? Are you just using Website Payments Standard, Exprses Checkout, or one of the other API? You mentiioned application id, are you using Adaptive Payments? You could use Adative Payments to do what you are wanting to, if you are not already doing this. This would allow you to process payments and split it between different accounts. In your business model, it would allow you to split the payments between different store owners if the buyers checkout contained items from different merchants/stores.

Related

Allowing users limited access only if they purchased successfully from stripe

I am building a react site where users can purchase a "day", "weekly" or "monthly" pass for the content on the page. I only want to allow them access for a day if they purchase a day pass. Same for weekly and monthly. I am using JWT to keep users logged in. I have no idea how to create the functionality to verify if they should still have access or not. Would love some help. I am also using redux if that helps.
You need to start thinking about Authentication and Authorization separately. Your JWTs are (hopefully) performing the Authentication duty. The "limited access" you're asking about are the concern of Authorization. In other words: now that you know who this user is, what are they allowed to do?
You need to map your JWTs to some form of internal user id, and then determine if they can or cannot access the requested resource/endpoint/etc.
For example, you might allow all users to GET from /jobs to view the listing of job postings, but if they try to POST to /apply for a job, you verify that they are a "premium" user, with time remaining on their paid subscription.

2 apps with the same database in Firebase

My project is to create an app similar to Uber.
There are 2 APPs, one for partners and the other for clients and I saw that I can create more than one app within the same Firebase project,that way I can use the same database for both APPs.
What I did not understand, how to do is differentiate the partners and the clients?
In the "Auth" menu, I would have to differentiate them with a Boolean.
Can I do this using Firebase? If not, does anyone know show me another way to do? or another database?
Another question I have is in relation to part of the payment, How I store the data of the credit card at Firebase? It support for this? Does anyone know show me a library to make payments straight through the app?
I don't think you can do that from the "Auth" Menu. This "Auth" function is only there for the sole purpose of letting user signup and login to your app.
You just need to implement the user category in your Real time database.
Store the user's uID, with key:value "userType":"client" or "userType":"partner".
And whenever the associated uID logs into your app succesfully. you need to read from the Real Time database to determine whether this user is a "client" or "partner" and show the appropriate functionality accordingly (or direct them to a different View controller eg: ClientViewController / PartnerViewController). Or if you have 2 entirely separate apps. Then this can act as a verification, just to make sure if this user is indeed a partner / client.
I'm not sure what to do with the payment system. But you can look at library like Braintree or something.

How to authorise a transaction between two PayPal accounts?

I am using AngularJS and have built a basic single page application. My users will enter in their PayPal email address and currency upon signing up and it will be saved within the database.
Any user can post something basic for sale for another user to purchase.
How can I authorise a transaction between two users PayPal accounts while keeping them within my site without a redirect to PayPal? All solutions online require the user to be redirected to PayPal.
You would need to use either Reference Transactions or Preapproved Payments.
You can't avoid a redirect entirely if the users are going to be paying with the PayPal Wallet. When they first sign up for your app/service they would need to authorize your system to make payments on their behalf.
So if you're using Express Checkout, for example, the user would be redirected to PayPal to authorize their account. After that is done your app could then process payments using the DoReferenceTransaction API without the need for any redirection through PayPal.
The Preapproval API sets up the preapproval profile, so yes, at that point they would be redirected. After that, though, you would have a preapproval ID that you would then pass into the Pay API in order to process payments for that person without any further approval (so no redirect) required.
If you're going to set this up with credit cards directly then you would need Payments Pro. With that you could authorize a credit card directly within your app so you wouldn't need any redirect at that point, and then once again you would use a reference transaction to process payments for that card in the future.

PayPals Instant Payments Notifications for WinForms

I am working on a WinForms application that has the ability to create and send invoices. In addition to creating invoices locally, the app uses PayPals Permissions API(and the invoicing API) to allow the application to (optionally)send invoices on the clients behalf.
My question is as follows, what is the best method of keeping track of the current status of invoices sent using PayPal? The application needs to know the status of each invoice so it can update its records locally.
I am aware of PayPals Instant Payments Notifications although I am unsure how this would fit together with a WinForms application(?).
My initial thought was to use the PayPal Invoicing API to query the required information on a as and when need-to-know basis. Additionally, a function that ran on a different thread could be run periodically to retrieve information in the background from the API, updating records locally.
Am I failing to acknowledge a better solution?
IPN will not fit invoice payment in case of creating invoice using permission API as there's no parameter to set the IPN URL in the invoice API. Your idea of calling GetInvoiceDetails API to retrieve invoice status based on need-to-know sounds a good solution for me.

Implement a paid subscription service on a website

I have a website and I would like to implement a paid subscription service. Its a simple service with only 2 types of plans. For now, ill just use Paypal. But im a little lost before start, mainly with the data model.
My main question for now is, what information do I need to keep for each subscription? Do I need to implement a shopping cart for this (dont think so)? Im not asking for a detailed explanation, just a few lights or resources to find a way to start. Thanks.
Depends on what technology you're using. Basic payments work a bit like this
-> You send them to paypal with a plan (you define the plan on paypal)
they know which amount to charge
you can pass custom parameters which they will pass back
Customer fills in application
<- paypal tells you that your predefined plan got purchased
in this same request, they send a lot of info about the payment including a GUID and your params
-> you ask paypal "hey, some one just told me this plan GUID got purchased, can you confirm"
<- paypal service returns 'yes'
-> you take the customer's ID from the params that you attached when you sent them to the paypal service and update them to "paid" in the database, or whatever
That's it in a nutshell...
Look at any subscription card mailer from any magazine and you can get an idea of what kind of data you will have to record. Start and end date for the subscription would be a good thing to keep, and what kind of plan the user is subscribed to. Once you have the end date, you just need to run a query to get the records of the users that have access. Something like
Select * from users where subscription_end_date is >= today
I'm sure there will be a lot of other columns that will go into your final product, but that will be up to you to decide what data you want to keep. What are the different states that a subscription can be in? Can someone be subscribed to both services at the same time?
PayPal does a decent job if you want to charge the same amount every month. However, if you anticipate your users making changes to their subscription plans (upgrades/downgrades) or needing to provide credits to their account for customer support purposes, PayPal would require that you cancel the subscription...and then have the customer re-subscribe.
[Full disclosure - I am a co-founder of Recurly.com]
Recurly handles the upgrades and downgrades, and provides automated customer emails to be sent out to your customers (on your behalf) for every event confirmation, and invoice that occurs. You also have a full account management dashboard and reporting so that you don't need to build this yourself.
Best of all, if you ever decide to leave PayPal, and move your business to a standalone payment gateway, Recurly stores all of your credit cards in a PCI compliant vault so you don't need to ask you customers to come back and re-subscribe. (PayPal will not return your customer credit card information). You simply configure your new gateway in Recurly, and payments will be processed without any interruption to your business.
Here is a blog post we wrote on the topic:
http://blog.recurly.com/2010/08/top-ten-reasons-to-use-recurly-vs-paypal-for-recurring-billing/
-Best of luck.
-Dan

Resources