Django payments guide - django

I am trying to make my own payment gateway django application.I went through many payment gateway websites like paypal, razorpay. But I'm facing issues like how the processing should be and how the workflow should be.
I just need to integrate this with my other website, so this is secondary preference.so i need help that how can I create payment gateway django application.Any resources for the same or any online prebuild Github/Gitlab etc repository available.
I have some experience in django but i need to do this project within 10 hours.
I need to implement very basic functionality of what payment gateways does. No need to api. Just locally I will connect my payment gateway app to my other website.
I just want to show how payment gateway work locally means creating my own very basic payment gateway app. Credit card details etc will be fake. No real money transaction.
Remember: fake payments and I just want to develop and show how payment gateway work. A basic local app. Without real payment thing but virtual and fake.

Related

Implement e-commerce platform with Shopify/Hydrogen + ExpressJS + DynamoDB hosted on AWS

I would like to start a new e-commerce platform build with Shopify/Hydrogen (React) an I'm still not sure about the back-end side (maybe ExpressJS + DynamoDB).
The issue is that I want to host everything on AWS, I am new there and I don't really know in which direction should I go.
Basically the platform is created for selling fishing stuff but it should also support the drop-shipping context, where other companies can sell their own products there.
Can anyone help me with a path for achieving this? What are the right steps?
Regarding headless storefronts you have multiple options with hosting, starting from Gatsby Cloud, through Netlify, Vercel or Amazon Amplify in case you want to host it on AWS.
I will assume that "drop-shipping context" would mean you want to become a some sort of a marketplace? Where other merchants would list their products and upon purchase handle the shipping themselves? You can organize that through using free open-source CMS - Strapi in a manner where it acts as a PIM (product information management system), basically you will create users in admin panel and allow them to put products into CMS and then pull and publish them to Shopify storefront (through Admin API you can even create products and add them to an order on the fly), also through webhooks that Shopify trigger on the purchase event you will be able to send a notification to a dropshipper.
Regarding Hydrogen it's pretty early in the making so I would suggest to take a look on React-powered boilerplates out on Github and it will boost implementation speed significantly.

Implementing Stripe with React-native and Django

I am using React-native for mobile app and Django as server. How to implement stripe payment gateway? How I can make a payment and send the response to the backend so that in backend I can handle which user is now subscribed?
In web we can do that using stripe-session url. We can hit the url and after successful payment it's return an id, I have to just post the id to the server.
How can I do that with react-native because by doing so I am kicked out from my app and the session url opens in the browser, i can make the payment successfully but cannot redirect to the app.
How to successfully I can implement this with react-native and django?
According to the Docs, React Native provides the Fetch API. You should be able to make POST requests to your Django back-end that way.
You may run into issues with authentication (since Django POST request require CSRF tokens). There are many docs about this topic and you should be able to find a solution that meets your needs with a few searches.
As for how to implement your Stripe payment flow, that depends on how you want to collect payment details for your subscriptions. Stripe public docs have many useful examples from using a Stripe hosted Checkout page, using Stripe Payment Elements, or using the basic Quickstart example to get you started. The Python back-end uses Flask instead of Django but it is not difficult to understand how to translate the functionality from one framework to another.
As a back-up and general best practice, consider utilizing webhooks to ensure your back-end is aware of changes to Stripe records. Financial networks include many asynchronous processes and it's a good idea to not just rely on the Request <-> Response loop.

How to Enter PayPal information into NetSuite with Web Services?

I am having an issue getting PayPal Payment information into NetSuite via Web Services. After setting up PayPal within NetSuite and setting up all of the Test Accounts with PayPal we have all of the external endpoints functioning properly with PayPal on our web site. When we go to try and import the Sales Order with the new PayPal Payment information most of the data doesn't transfer.
Specifically the "payPalStatus" and "paypalAuthId" fields available to us through web services are both left blank in NetSuite. The "payPalTranId" field is the only one that remains populated upon submitting the order Via Web Services. When trying to Capture against this Authorization inside of NetSuite we cannot.
If anyone can point us in the right direction on how to resolve this issue it would be greatly appreciated.
Thank You for your time!
AFAIK those fields are for when you are using a Netsuite hosted web site and their PayPal integration. You can try filing a case.
If you have the payPalTranId you can write an integration against the PayPal API to capture your sales. The PP API is pretty straight-forward.

Spree Commerce - Amazon inventory sync?

Is it possible to create a product on amazon programmatically using the api? I would ideally like to create a product using the spree commerce CMS and at the end of the day sync products between the CMS and an online amazon store.
On the Amazon side, you can create products using the Amazon Marketplace Web Service, in particular the feeds API (code samples here).
On the Spree side, you can make this happen by either writing an extension, or by using Spree's middleware product (Wombat) and creating a custom integration for it.
Spree is pushing hard for more integrations that have broad appeal, and syncing with Amazon MWS definitely fits the bill, so you may be able to contact them and get some help doing these things (my company is a Spree partner, and we're currently working on an open source integration to a popular CRM tool for another seller).

Make payments without using third party gateways

I want to process electronic payments. I am currently using PayPal but it costs too much. Many companies are able to provide electronic payments without using gateways. I imagine they use banks web service directly.
How does it work? Should the beneficiary of the payment open an account in that particular bank?. For instance how does "Pay with Square" work? Does it implement call to different banks?
Does any documentation exist?
Thanks
Many companies are able to provide electronic payments without using gateways. I imagine they use banks web service directly.
This is incorrect. Basically all web sites which process credit cards (including integrated services like Square) are using a payment gateway. There is generally no way for an average user to determine which one they use, as the details of the payment gateway are not generally exposed anywhere.
Note that PayPal's Express Checkout web frontend is not a gateway. PayFlow Pro is, though.
The customer's bank is never involved directly at all. A typical credit card transaction involves a number of different parties:
The customer
The merchant (e.g, you and your web site)
The payment gateway (e.g, PayPal w/ PayFlow Pro)
The payment processor (typically a bank, but not necessarily the customer's bank)
The credit card issuer (Visa, Mastercard, etc, possibly under contract with the customer's bank)
Of all of these parties, the one which you will communicate with directly is the payment gateway. Everything else is behind the scenes.