I need to implement Stripe payment gateway in one of my application, is there any plugin or something I can use to add card and charge customers for some service. If anyone having any references please suggest.
I have gone through some tutorials and plugin but none of them are as per my requirement some plugin allows only to add a card but I am unable to find the plugin that can manage payments with the Stripe.
After successfully adding card, you will get a response with a token.
Pass that token to your backend server, you could call charge.create(it depends on your backend language, check stripe documentations) function to make the actual charge and other stuff.
You can use stripe_payment plugin
Here is an article showing you how to do implement payment in flutter using firebase and stripe
https://medium.com/#info_4766/build-a-marketplace-in-your-flutter-app-and-accept-payments-using-stripe-and-firebase-59f074201718
This is best done in Firebase using cloud functions, rather than from the app. Find links below for more info on how to do this:
https://github.com/firebase/functions-samples/tree/master/stripe
https://www.youtube.com/watch?v=JeyxolsJ3aE
https://www.youtube.com/watch?v=BrLTF4QdRrM
For these reasons:
There's the security aspect and one of these links explains it's not a great idea to have your stripe secret inside your client.
I want to be able to make this available from flutterweb, as well as other devices. Flutterweb is currently not yet supported by any plugin. The plugin that's best evolved and most used is https://pub.dev/packages/stripe_payment. Flutter-web has not been released yet (more, see https://github.com/jonasbark/flutter_stripe_payment/pull/147)
Related
I am building an event management app and am currently in the stage of adding payment funcionality to it. I have followed the firebase documentation and all seems to be in working order and I can easily add products to my firestore database when using the Stripe dashboard. I am just wondering how this could be done either client side (flutter) or using cloud functions?
I have tried watching tutorials, looking at the limited github examples and reading the documentation however all the products seem to be made through the stripe dashboard - obviously not ideal to have to manually create every one!
Creating Products via the Stripe API requires an Account's secret API key. You should never expose this since it provides full access to your account. So creating Products from the client-side is not something we will consider.
Additionally the Stripe Firebase Extension does not include any cloud functions for creating Products. The docs even have you create a restricted key to keep your account safe. All of that suggests to me that you will want to either
Create products from the Stripe Dashboard as previously indicated in tutorials and documentation.
Run local scripts to create products via the API using one of Stripe's client libraries which you can install locally.
I need to add stripe to a flutter app where I can save a credit card with a custom form, but since I only found an unofficial sdk that provides a pre-built form (stripe_payments), is there a way to work with API requests without relying on an SDK?
All SDKs are essentially just wrappers for Stripe's API. You can make those calls yourself using something like curl or fetch: https://stripe.com/docs/api?lang=curl
Bear in mind that some of those calls require a secret key and some can be done with a publishable key. You should never use a secret key on your client, only on your server.
Today I have been trying to implement the rest API into my application to look up transaction information from a transaction ID (GET /v1/payments/sale/)
I have implemented everything correctly on my end and set the mode to "live" and I can't seem to get details from a transaction.
Here is the full error code:
{"name":"REQUIRED_SCOPE_MISSING","message":"Access token does not have required scope","information_link":"https://developer.paypal.com/webapps/developer/docs/api/#REQUIRED_SCOPE_MISSING"}
And here is documentation on what I am trying to do: https://developer.paypal.com/docs/api/#look-up-a-sale
Any help would be appreciated.
Thanks.
There are few things you could do to make sure your configurations are set right.
If the mode is set to live, are you using the live credentials instead of sandbox. You can select the sandbox app and copy the live credentials from there. See bottom part of this image.
Make sure Payments are enabled on live. PayPal has a dashboard page, where you could see all the services that you have enabled to work with Live environment. This prevents accidents on unknowingly using an API on live. You can check the status here
Is the sale that you are looking for created by the same clientId that you are using for making a GET call ? Only the app who creates the sale, can view the sale.
In the mean time, PayPal has created SDKs for many languages to support REST APIs. They are actively developed, and maintained, and could help you mitigate issues in handling tokens, credentials, etc, and allows you to quickly use APIs faster and in a way that could be upgraded easily. Also, few SDKs come packaged with Sample codes, and wiki documentations. Few are still under development, but you can feel free to contribute back to these open source SDKs.
When I had this issue, the problem was that I was making REST requests using the Identity API token. Basically, I was logging users into my website with Paypal then using that token for REST requests when another token from the REST API service should have been used. "
Here is the support ticket from Paypal SDK deveoper Randy who helped answer my question even though I do not use the SDK. Thanks Randy:
https://github.com/paypal/PayPal-PHP-SDK/issues/785#issuecomment-282749095
Im trying to implement paypal on a website, where I want to give my site-users the ability to add paypal as an payment option for there web shops. So I'm using Laravel, and I found this one, http://jslim.net/blog/2014/09/19/integrate-paypal-sdk-into-laravel-4/ and do pretty much like that.
So my question is, is it possible to combine the Permissions API from the Classic API and using the Rest API for my shop? And then could anyone point me in the right direction?
Currently adding PayPal REST API and Classic API SDKs are causing namespacing conflict issues, as to prevent breaking changes in REST API. The work is under way to release 1.x version of REST APIs that would allow you to work with both rest and classic APIs together.
We need to accept credit cards (from anywhere in the world) directly on our website. We'd like to use PayPal, but NOT require a PayPal account. The user should be able to simply type in the credit card, date and cvv directly on our site and go. I'm having a hard time figuring out what PayPal API I need to use for this, to integrate with our Java-based server. Turns out PayPal has an overwhelming number of APIs and documentation.
It looks like this link is what I'm looking for... sort of. But can I post this directly from JavaScript? It includes account name and password, which would be in the clear for anyone to see, so I'm thinking this must be server-side code. So the idea is to use a REST API to do this? So the client must pass the credit card information to my server, which then calls PayPal's server?
I'm a little lost, when looking at all the APIs at the Rest API page. Which ones exactly do I need to use?
There is also this link but I'm not familiar with "curl" -- looking for Java. Maybe the distinction is minor and easy to convert from one to the other?
Vern, if you look at the top of this page, you'll see Java (click Java) as one of the languages supported by the PayPal REST Payment API:
https://developer.paypal.com/webapps/developer/docs/api/
You will see related sample requests that use the Java SDK:
https://github.com/paypal/rest-api-sdk-java