flutter and stripe (setupIntents) - django

I know this library flutter_stripe, which to me seems to be very limited in stripe interactions, it only does paymentIntent creation and that is basically it. Please do argue if I am wrong.
I am looking forward to see if there are other packages, if any, for flutter to interact with stripe in more depth, I am trying to avoid Android/IOS native languages.
I do these in backend: create stripe customer, create setup intent for each customer as they try or either add bank card or make purchase.
I am looking forward that client will interact to stripe for the following:
1 Confirm setup intents
2 Send card data to stripe
Another question, could you please assess my payment flow? If it is faulty please recommend another way
Once setupintent is confirmed for the user, they hit backend for whatever purchase they want to make, backend contacts Stripe, fetches the setupintent, creates and confirms the paymentintent.
Thank you, I appreciate help.

Your payment flow looks normal and it's basically outlined in Stripe SetupIntent Doc. The Doc only has Web/ iOS/ Android/ React Native, but the flow should be the same.
There is also an example inside flutter-stripe's repo for SetupIntent. Both resources should be enough well-explained reference for adapting to your implementation.

Related

How to avoid data duplication in a microservice architecture

I am learning about microservices and I get very confused when it comes to data duplication. From different sources on the internet I get very different opinions on the subject, but the main conclusion that I got is that it depends if it's good on your use case or application.
Now I am struggling because I am trying to make a very simple microservice where I think data duplication is not necessary, but can't seem to think of a good alternative to it.
My Application
I am basically making a Twitter clone to understand the basics of microservices using AWS. To start I have 3 services:
Timeline Service
Post (or tweet) Service
Follow Service
Timeline service
The timeline service should return the timeline of the user that asked it. It should check who the user is, that requests his/her timeline is following, get the 100 most recent posts from those users and return it to the user (that requested his/her timeline)
Posts/tweet Service
When a user is posting a new tweet/post, the post timeline should save the post in the post database to keep track of who posts what.
Follow Service
When a user wants to follow another user the follow service should keep track of that.
If I put it into an image it would look like this:
The problem
My question is about the timeline service. Should the timeline
Have two (in memory) databases that also keep track of who follows who and who posts which tweets to give the user quickly their timeline back
Or should the timeline service call the different services to get that information?
The 'bad' thing from the last option would be that if my posts service is failing and can't send or receive requests, my timeline service also does not work and you create dependency which goes against microservice principles.
Since the last option seems the worst one to me, I would say data duplication is the better option because of response time and to keep the different services from relying on each other.
Can anyone help me to get on the right track with this problem?

Providing direct links to Auth.Net admin, specifically refunding

I've got a frontend app that handles payments via Authorize.net. In the end, I've got a TransactionId attached to my own order object.
I would like to provide a direct link for my staff that takes them to the transaction in Authorize.net.
Our specific use case is for refunding, and I figured out this link in the sandbox: https://sandbox.authorize.net/UI/themes/sandbox/transaction/QuickRefund.aspx?TransID=1234567890
I would rather send them to the transaction, and let them click the refund button to get that page though.
This doesn't work: https://sandbox.authorize.net?TransID=1234567890
Anybody have any ideas? I could always write my own endpoint that does a refund via the api, but a direct link would be good enough and much easier if it exists.
This functionality does not exist. You will need to build your own endpoint that uses their AIM API to process the refund.

Django paypal checkout for WHOLE cart

I made a Django online-store site and I need to include paypal checkout system for the cart, but solutions I found online either just for one item only(Buy Now buttons) or something like django-paypal-cart, which is not well-documented and I can't figure out how to make it to the checkout.
Please, give me some hint, maybe good article about how to make your cart items go to the checkout, anything will be highly appreciated, I don't know what else to google now
There are numerous options for tying PayPal into your website or app. Depending on exactly what you're doing or how good you are with web service API's you may choose one or another.
If you want to keep things simple, you can stick with Payments Standard. This is basically what you're referring to about the one item only buy now button, but you can use the cart upload command method to build a form that includes multiple items and pass it all over to PayPal at once.
If you prefer web service API's I'd recommend using Express Checkout. This consists of SetExpressCheckout, GetExpressCheckoutDetails, and DoExpressCheckoutPayment. Read through that general EC documentation to get familiar with the calls and how it all flows.
Another thing I would highly recommend utilizing is Instant Payment Notification (IPN). This is a feature where PayPal will POST transaction data to a listener script that you have sitting on your server any time a transaction occurs on your PayPal account. This includes payments, refunds, disputes, cleared payments that were pending, etc. This allows you to automate tasks like updating your database, sending out custom email notifications, hitting 3rd party web services, etc. and it happens in real-time, so it's very powerful.

Getting django stripe payments to return user history

Im trying to configure django-stripe-payments to work properly. I'm using the following along with it:
pinax-project-account(https://github.com/pinax/pinax-project-account)
bootstrap-ajax (https://github.com/eldarion/bootstrap-ajax)
The trouble is that django-stripe-payments is not showing me my information in the template, such as my payment history or if my subscription is active even though it is.
Stripe is indeed picking up the payments and customer creations.
Has anyone got it working who can offer me some advice?
I understand this question is vague, I just don't know where the problem is.
Image of the the problem
You need to setup webhooks:
In Stripe dashboard go to Your Account and then Webhooks
Add a URL to a publicly reachable URL that is where you are testing (if running local dev runserver, I have found localtunnel to be immensely useful)
Now when you make purchases you should see the data show up within seconds.
django-stripe-payments is designed around processing events data sent from webhooks.

How do I send an Enterprise Activation email? Using EnableBlackBerryUserDispatcherAttributes?

This is regarding a Blackberry that is connected to a BES Server, and the Administration Web Service.
I need to enable and send an Enterprise Activation email, however I need to also set an ActivationPassword.
I looked at the help document and after tracing the abstract classes, I think I need to do "something" with EnableBlackBerryUserDispatcherAttributes.
How do I send an enterprise activation email with a password to an Exchange user? I can't find anything, anywhere. (Sure I can add a user to the server, but what good is that if I can't activate the account !?)
I've found the following objects in the webservice that indicate it is possible, but I can't figure out how to use them...
ActivationPassword;
ActivationContext;
ActivationPasswordType;
ActivationPasswordOperationTypeEnumType;
clearActivationPassword;
EnterpriseActivationEvent;
setActivationPassword;
Just to be clear the online samples only address the creation of a user, not enabling them.
My alternative is to shell out $250 bucks for this missing documentation.
If you are an ISV partner or T3 subscriber, the answer to this question is free for you at devsupport#rim.com so I'll appreciate any strings you can pull as well. While you're at it I'd appreciate if you can tell me how to update the email component as described on this part of the admin website
The user list from the company
directory is automatically updated on
a timely basis. The update process can
be manually started using the email
component.
you should have a look at the dispatcher webservice. This means you have to generate a stub for the dispatcher webservice as shown in the tutorial. The stub is a instance of com.rim.bes.bas.baa.BAADispatcher which holds methods for setting and generating EA-passwords.
Regards