Comments (6)
Yes you are right on the plugin taking the cart amount and sending that to Paystack. In Medusa and the plugin by extension, prices are represented in the lowest denomination of the currency. To charge KES 3650 in your case, you need to provide the prices in the admin as 3650 * 100.
The default Medusa starter localizes the amounts and so it should show up as KES 3650 on your frontend pages with 365000 given to the plugin and subsequently sent to Paystack.
from medusa-payment-paystack.
Please do create a separate issue for the transaction failing issue. The error logs you added are indicative of an issue after the original failure which probably happened in the plugin. You could enable debug mode in the plugin to see extra logs which could guide you to what is failing. Add debug: true
to the plugin's config to enable debug mode
from medusa-payment-paystack.
Isn't that a bit off that I need to add my prices in backend as KES 365000, that means changing so much across the board, e.g. for other currencies, showing it back in storefront etc. When we could get an option to change the value before the plugin consumes it. Adding the prices as n * 100 in backend is changing a lot of inner workings, even for reporting, only to accommodate Paystack. Also check the other issue similar to this, that would mean the person has to change the prices in their backend in the live environment to accommodate paystack
from medusa-payment-paystack.
It would also mean that someone who has used a different payment processor and chooses Paystack later with the plugin would have to change all their product prices to n * 100 to use the plugin.
I propose push a breaking change in plugin doing the n * 100 internally. Everybody is sorted that way in the most least effort way
from medusa-payment-paystack.
I am confused. To clarify, are you using the default Medusa admin dashboard?
If you are, this is what adding KES prices should look like:
When being saved to the backend, the admin dashboard automatically localizes the prices to the lowest denomination before sending to the backend, i.e. the n*100 conversion you want done.
Prices will be stored in the database with this value and all the other parts of Medusa (fulfillment, storefront, this plugin etc) expect the prices in the lowest denomination. Paystack also expects amounts in the lowest denomination (i.e. to pay KES 3650, the amount value sent to Paystack needs to be 365000). You can confirm this from the Checkout demo.
This is the default behaviour and I suggested performing the n*100 conversion yourself because I imagined you were on a custom admin. You shouldn't need to do that otherwise.
You'd have to provide more information on your setup and changes you have added that may affect how amounts are set in your store for us to be able to help.
from medusa-payment-paystack.
Oh wow. I actually really noticed the prices in the other issue' screenshots. I had not noticed this price amounts. Yes I am on a custom admin. This is all fine then. The most weird thing to do and see, however, but I'll change the prices on my end.
I'll close this one and open the other issue
from medusa-payment-paystack.
Related Issues (18)
- PluginLogo
- AddPaystacktoregionImage
- Medusa >=v1.8 support RFC HOT 1
- Replace out of date `paystack-api` package HOT 6
- Automatically mark payments as "Captured"
- Paystack payment not initiating HOT 8
- Paystack popup flow complaining of duplicate transaction ref HOT 5
- Update deprecated subscriber implementation
- Order reconciliation issue HOT 21
- Query Error on calling "complete transaction" HOT 9
- Handle Paystack 5xx errors better HOT 1
- Support payment verifications via webhook
- Excessive valid email address checks being sent to Paystack? HOT 2
- Build failing pointing to plugin HOT 7
- Failed to Authorize Payment HOT 7
- Payment Method Not showing up immediately on Example HOT 2
- Implementing Medusa Paystack to the Storefront HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from medusa-payment-paystack.