new0 / direct-stripe Goto Github PK
View Code? Open in Web Editor NEWStripe payment button for WordPress websites
Stripe payment button for WordPress websites
While displaying the amount for a one-time payment is done in the button, it doesn't
seem to work for a subscription. It doesn't show any amount.
in ds-modal-button.php
, $ds_button->display_amount === true
will always be false
, because display_amount is always set as a string, not a boolean.
It might be the case for other boolean attributes, but didn't test them.
There is no support that I see for supporting a "customer specifies" amount for a subscription -- or alternatively, there is no support for a monthly subscription with a customer-specified month amount.
There also seems to be no support for the customer specifying a total amount limit either in currency or time or number of recurring payments.
The theme https://the7.io/ makes options not to be retrieved and printed on screen, that means we don't know what are the current settings.
This issue doesn't happen if we don't store users and transactions in the WordPress database using the option under the Global settings tab at Direct Stripe -> Settings.
Referenced at https://wordpress.org/support/topic/signup-with-same-email-but-different-card-doesnt-add-card/
For subscription buttons, when the user is logged in and subscribes with a new card ( not the default card registered in Stripe ), the card is not added to the Stripe account and the subscription is made with the default card from Stripe.
Hi, the plugins is working fine except after the payment. I attached in the setting the success page (http://www.sdgdigital.com/merci/). But after the payment, it goes to a page like this:
Because i am in a test mode, did i'm suppose to see something in the log?
Best Regards
I've added some fixes to the build tools to allow doing a npm install
and get a setup that work with some of the current versions.
Instead of using Stripe auto language parameter, set the language from a setting of the button.
When an error is displayed, the reset form button will clear elements and the error but if an error happens during the new submission, the error is not displayed a second time
Does this plugin support taxes? https://stripe.com/docs/subscriptions/taxes
In English, an amount should be written USD30
and not 30 USD
like in French.
Maybe a setting could allow to chose how it should be displayed?
https://user-images.githubusercontent.com/11990914/65167938-ca1be300-da43-11e9-8941-6d50ff39a8be.png
When no image is selected or when removing the previous one, the logo is replaced by a broken image
The corresponding setting is also saved as http://empty
(@New0 I've made some changes already, which I'll split in different issues and PRs.)
@New0 I've encountered an issue when having several buttons on the same page, so I went ahead and refactored a basic modal object, using a global ds
object.
You can see what you think.
Some of my buttons have stopped working - I have updated the plugin, but not using WordPress 5.0.3 yet.
the subscription buttons are working ok but not the one off payments? I can see this error in chrome?
can you shed any light please.
url is wegive.steiner.academy
main.min.js?ver=4.9.9:1 Uncaught TypeError: Cannot read property 'currency' of undefined
at HTMLButtonElement. (main.min.js?ver=4.9.9:1)
at HTMLButtonElement.dispatch (jquery.js?ver=1.12.4:3)
at HTMLButtonElement.r.handle (jquery.js?ver=1.12.4:3)
The filter intridoced in #149 are not applied
The Front end modal uses some non-prefixed classes such as .success
and .error
that will inevitably get overridden by themes and other plugins, so they should have enough styling to not break the layout.
Also the z-index of 1
is going to be too low in many themes that use a fixed positioned header or other elements.
Over the last couple of days a charity I work with has had vast number of fraudulent payment attempts submitted to Stripe via this plugin on their website.
The official Stripe documentation states that to minimise card testing fraud it is good practice to implement CAPTCHA on payment forms (https://stripe.com/docs/disputes/prevention/fraud-types). Would it be possible to add an option? Or can it be done currently with a hook?
It would also be good to have the option to capture the payer’s name (again for fraud prevention purposes).
The CSS values set in ds-element.js could use a filter.
Can I configure the payment to have users enter the amount like how the donation portion is set up. I just don't want payments to show up as a donation on the backend to not get anyone confused?
Minor release to improve current state of process, mainly errors and styles
Add an option to set zip validation on client side
Since the update to the new modal, the "false" boolean used in shortcode attributes were not converted to booleans and are not working.
billing, shipping, display_amount and tc
Catch exceptions and errors and return them in the form
wprox wrote on .org ( https://wordpress.org/support/topic/processing-5/ )
I have a 3 column pricing table, each column has a button at the bottom of the column (very standard). For some reason, the Processing… text / jumping dots ALWAYS shows up in the FIRST column only, no matter which of the 3 buttons was actually clicked.
This is really not ideal in mobile, where after the Stripe modal, the person is thrown back into the (VERTICALLY STACKED) specific column / button that sent them to Stripe, and they CAN’T SEE the Processing… text IS ACTUALLY DISPLAYING BUT in the FIRST pricing column ONLY, which in mobile is way at the top! So they are blindly sitting there waiting with no feedback on if anything is happening, which is bad UX.
I can see in chrome dev tools that every one of my 3 buttons in its column has this code:
SO, now I just need the Processing… text / jumping dots to show up after the Stripe modal NEXT TO THE BUTTON THAT WAS CLICKED so the person can see that something is happening, NOT next to only the first button column, that the person would not see in vertically stacked mobile.
When there's a Stripe error (such as no credit card number or the likes) when pressing the pay button, the spinner shows, but doesn't disappear when Stripe returns the error.
Also the .visible
class, which is added to the .error
container, doesn't have any styling (which results in the error staying hidden).
Testing out this plugin on a wordpress site running 4.6.1. The test page is available at
https://uvacswim.org/stripe-test/
On saving the Direct Stripe/Settings, I receive the following error:
Warning: Illegal offset type in isset or empty in /home/content/p3pnexwpnas12_data03/00/3615300/html/wp-includes/plugin.php on line 211
Warning: Cannot modify header information - headers already sent by (output started at /home/content/p3pnexwpnas12_data03/00/3615300/html/wp-includes/plugin.php:211) in /home/content/p3pnexwpnas12_data03/00/3615300/html/wp-includes/pluggable.php on line 1174
Submitting a test donation works as expected, the transaction appears in our Stripe account. However, on page refresh, the same errors are displayed.
Make clear the display amount option doesn't work for subscription button type.
Hi @New0
I'm trying to setup the repo for developing, and I'm encountering an issue when loading the admin page. If I run npm run build
, the admin page then loads for ever and the browser uses 100% CPU. So I guess it's some kind of loop.
I see this folder hasn't been uploaded for some time, so I wonder if it's still working for you?
Otherwise maybe some of my dev dependencies versions are wrong. What node / npm versions do you use on this?
@New0 This is at the moment only a suggestion.
I'm not sure that the current design of the modal will fit most users, as it relies strongly on a "primary" colour, which might not be fitting for everyone.
I would suggest something more in the lines of Stripe's example: https://stripe-payments-demo.appspot.com/ (it's not a modal, but the form styles are clean and could fit most purposes).
A lower amount of styling could also be an option, as most themes come with styles for form elements.
Allowing to inline the form directly could also be a nice option (no button trigger).
I'm happy to work on some of the parts if you agree.
Hi, thanks for building Direct Stripe!
Can I ask you to add support for a trial period on a subscription?
I created a plan with a trial period in the Stripe dashboard, but it didn't work with Direct Stripe. When I made a test purchase, the subscription did not have the trial period. Stripe Support told me the API call to \Stripe\Subscription::create
needs to set trial_from_plan=true
.
Alternatively, Direct Stripe can ask the user for the length of the trial in days, and then pass trial_period_days=n
or trial_end=unix_timestamp
.
Thanks for your help!
Hello I have a error 500 when I pay for a subscription. It say Internal Server Error
and no-referrer-when-downgrade
.
And the loading buton for the payment didn't change.
Hey mate ... just found your plugin. Seems like it will do the job I want out of the box (although not yet tried to make it work for my requirements) :-)
Any plans to add any more simple shortcodes? For example:
I'm needing a way to output (via shortcode) very simple "status" type info for a user/transaction ie in the site I'm building (a membership style site) ... the user fills in and submits the registration form with email address/name etc (essentially creating a WP user with subscriber capability/role), gets auto logged in (so has a user id etc), then fills in their profile (another form with more fields), submits that form, gets directed to a page to pay for a subscription (using your Stripe plugin), on successful "authorisation" (not capture) the site admin gets notified that the user has completed their profile and paid, they can then "approve" the user in the normal WP way by upgrading their role to Editor (or whatever), which then uses a hook to tell Stripe to capture payment/subscription.
That is the basic "flow", just looking for a way to use a shortcode that then uses the user id/email/trasaction id (stored in user meta) to output basic status from Stripe ie Date, Amount, Subscription Details and maybe a "Cancel" button that can cancel the Stripe subscription.
Would something like this be possible and also a good addition to your already awesome plugin? How would I go about leveraging the excellent foundations you have already to add that extra capability?
Cheers.
The Payments Intent API is preferred over the new Checkout API to allow deeper possibilities of customization. https://stripe.com/docs/payments/payment-intents
Before my critique I must say I really appreciate the plugin and it has served as an excellent example of how to integrate Stripe with WP.
Looking through the code, it appears that the nonce is only checked server side.
This should be considered a security concern because it effectively negates the whole purpose of using a nonce.
This is the current plugin nonce logic:
I don't see a case above where that logic would ever result in a nonce verification failure.
The current VueJS admin app needs to be updated using WordPress core tools usch as wp-scripts and wp-env
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.