• Resolved wprox

    (@wprox)


    Hi Nicolas,

    Thanks for the plugin, very excited to start using it ??

    I’ve setup an account on Stripe, and have put my test API keys into your plugin settings. I have not put in my live keys into the plugin settings because I haven’t put in all the info to activate the account and actually get assigned live keys. I’m hoping that’s not an issue while I’m only in testing mode anyway.

    Questions:
    1. I have been able to fill in all the tabs, EXCEPT Buttons Settings tab: when I put in button name and click CREATE BUTTON, I get a blue spinner that just keeps spinning. I can actually select that button name below, and see all the options, but the blue spinner never goes away??? Unless I delete the button, and then Saved flashes and the spinner goes away.

    2. I am using Elegant Themes’ Divi’s Pricing Tables module. It requests a Link /
    Button URL: Input the destination URL for the signup button. Is there a way to get a link for that? or would I have to “Add Stripe Button” to Content Section and then format it myself?

    3. Regarding Styles Settings tab > Terms and Conditions:
    I see plenty of examples of check boxes with “By clicking Sign Up, you agree to our <Terms link>, <privacy policy link>, etc.” Is there a way to include other links to pages such as Privacy Policy in that checkbox copy, beyond just the Terms and Conditions page link?

    4. I noticed in the Stripe dashboard, there are many settings sections where you can input information and customize settings. I’m confused whether I can actually use those Dashboard settings since I’m using the plugin, and there seems to be some overlap between those settings and the ones in the plugin Settings. For example, https://dashboard.stripe.com/account/emails
    Email receipts settings

    Email customers for
    Successful payments
    Refunds

    Customize design
    Customize the look of emails sent to your customers. Input: icon, color.

    Can I use all the Dashboard settings or just the ones you’ve actually setup in the plugin settings? What about settings that overlap in Dashboard and plugin?

    Thanks so much ??

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Nicolas Figueira

    (@nahuelmahe)

    Hello @wprox,

    Thank you for using Direct Stripe.

    You don’t need live keys as long as the Use test keys option is enabled.

    1. What happens when you refresh the page after creating a button ? Is the new buttonlisted in the Edit button dropdown option ?
    Could you test with your browser’s console opened ? ( Guide to Open the console ) And report errors that may appear ?

    2. Direct Stripe creates a button, it will not create a link, it’s easier to insert the button in the content, or its shortcode aquivalent in a template.

    3. The T&C link is not editable yet. I worked on a filter hook that will allow editing this link but it is not yet published on the WordPress library.
    If you want to test it :
    – Download new version at https://github.com/New0/direct-stripe/archive/develop.zip
    – Delete the current Direct Stripe plugin from your WordPress installation
    – Go to Add Plugin -> Upload plugin and use the zip downloaded to install ne Direct Stripe Version
    – Activate it
    – Use the example at https://gist.github.com/New0/2faa2158fb7bb4209a0d3f6b165e1fec to set a filter hook in a custom plugin or (child-)theme functions.php file.

    4. In the precise case of emails, it indeed overlaps, so you can use both or the one you want. You can use the settings you want from the Stripe dashboard, Direct Stripe is meant to trigger a payment/subscription that creates a customer, then the management is to be done via the Stripe Dashboard.

    I hope this will help,

    Best wishes,

    Thread Starter wprox

    (@wprox)

    Thank you Nicolas for your detailed answers!

    1. Errors in JS Console after entering button name and clicking Create Button:

    POST https://myurl.com/wp-json/direct-stripe/v1/buttons?id=ds-numbers-here&data={%22text%22:%22Cheapest%22,%22value%22:%22ds-1538402120424%22,%22type%22:%22Payment%22,%22amount%22:1000,%22button_id%22:%22MyButton%22,%22name%22:%22Company%20Name%22,%22description%22:%22Description%22,%22label%22:%22Payment%22,%22panellabel%22:%22Confirm%20payment%22,%22coupon%22:%22%22,%22setup_fee%22:%22%22,%22zero_decimal%22:false,%22capture%22:true,%22billing%22:false,%22shipping%22:false,%22tc%22:false,%22rememberme%22:false,%22display_amount%22:false,%22currency%22:%22USD%22,%22custom_role%22:%22%22,%22success_query%22:%22%22,%22error_query%22:%22%22,%22success_url%22:%22%22,%22error_url%22:%22%22}&_dsnonce=numbers-here 414

    Error: Request failed with status code 414
    at t.exports (createError.js:16)
    at t.exports (settle.js:18)
    at XMLHttpRequest.f.(/wp-admin/anonymous function) (https://myurl.com/wp-content/plugins/direct-stripe/admin-app/dist/build.js?ver=0.0.1:6:34728)

    buttonsSettings.vue:634 Uncaught (in promise) TypeError: Cannot read property ‘message’ of undefined
    at buttonsSettings.vue:634

    What happens when you refresh the page after creating a button ?
    No buttons there

    Is the new button listed in the Edit button dropdown option ? No

    2. Got it. Still waiting to hear from my theme on how best to do this in their pricing table module.

    3. Very cool, when do you think you might push this to the plugin?

    Thanks again ??

    Plugin Author Nicolas Figueira

    (@nahuelmahe)

    Hello @wprox,

    Thank you for the information, I’m afraid that is not an error I came accross.

    Just to be sure, did you rewrite the errors or you are in a local environment ?

    Did you try to deactivate all other plugins and activate twentyseventeen theme to test creating a button ? If not, could you try ?

    Best wishes,

    Thread Starter wprox

    (@wprox)

    Hi Nicolas,

    I am running it on my hosting company’s server, just pasted in errors from JS Console.

    I deactivated plugins, and it appears to be iThemes that is causing this issue.

    Any ideas on which / types of settings might be causing this?

    Thank you ??

    Thread Starter wprox

    (@wprox)

    Hi Nicolas,

    I turned off this setting in iThemes, and I think it fixed it:
    X Filter Long URL Strings
    Limits the number of characters that can be sent in the URL. Hackers often take advantage of long URLs to try to inject information into your database.

    Makes sense? I’m new to JS Console errors, but I guess it tried to post that crazy long url with all the button settings, which iThemes then limited / chopped down, hence your plugin hanging with spinner…

    Plugin Author Nicolas Figueira

    (@nahuelmahe)

    I’m glad you found what was causing this issue ! The 414 error code indicates the request is too long so that makes sense. When you save a button in Direct Stripe, it calls an API route with the button options set as a parameter.

    Could you confirm that you are abe to create butons after turning this option off ?

    Is there an option to whitelist precise URL’s after turning on the X Filter Long URL Strings option ?

    Best wishes,

    Thread Starter wprox

    (@wprox)

    Thanks Nicolas.

    Yes, I am able to create buttons after turning this option off.

    I could not find an option to whitelist precise URL’s after turning on “Filter Long URL Strings” option.

    Questions:
    1. I had some buttons that I setup in Button settings disappear or portion of what I setup for a button disappear, and had to reenter the info. After I did reenter the info, everything worked fine. But hoping this doesn’t keep happening? Ever heard of this?

    2. So for a standard pricing table, 3 columns, each having a button at the bottom of the column to buy that option: If I setup that T&C checkbox through Styles Settings, then I get a T&C checkbox INSIDE THE PRICING TABLE, UNDER EACH Direct Stripe BUTTON, is that right?

    I’m not used to seeing a T&C checkbox INSIDE THE PRICING TABLE under each button like that. I think I usually see it in the next step, when the user starts registering / paying. But since the next step here is Stripe Checkout, we can’t put the T&C checkbox there. Am I understanding this correctly?

    3. If user hasn’t clicked T&C and tries to sign up, an error code comes up “Please check the T&C”. I actually don’t call it T&C, but instead call it Terms of Service. Is there an easy way to update that copy text so it matches the text next to the checkbox?

    Thank you so much!!!

    Plugin Author Nicolas Figueira

    (@nahuelmahe)

    Hello @wprox,

    1.I’ve never experienced or been reported issues with options already saved.

    2.The required “T&C” checkbox option is related to a single button and you are correct, the stripe modal form don’t include it so I added it next to the button.

    3. I’m afraid that text is not editable at the moment. It would be nice to make it editable.
    I’ll try to add an option soon (although I can’t promise any timelapse)

    Best wishes,

    Nicolas

    Thread Starter wprox

    (@wprox)

    Thank you Nicolas ??

    Question about my SVG logo, which I’ve been wrestling with this weekend:

    It has text elements via @font-face references, which when used on my website wrapped in an object tag or when the SVG file is opened in chrome so it is inline html, looks great.

    However, when I upload my SVG logo in your Global Settings, it shows up in the modal wrapped in an img tag and as a background-image.

    If you embed an SVG with text elements into a web page with an img tag, or if you use it as a CSS background image, browsers prevent external file downloads with SVG used as an image, so any @font-face references to web fonts will be ignored.

    So, is there any simple way for me to update the modal logo html, so the logo is wrapped in an object tag or inline html, so that my fonts actually show up?

    I was hoping to fix it myself by embedding the fonts via data URI’s, but unfortunately, couldn’t get that to work this weekend.

    Figured it was worth asking, may just have to convert to another file format, since I’m running out of options for making the fonts show in the SVG under the current modal html / css wrapping.

    Thanks again!!!!

    Plugin Author Nicolas Figueira

    (@nahuelmahe)

    Hello @wprox,

    I definitely suggest to make the file a JPEG or png if you need transparency.

    The svg will require adding CORS definitions for the dependencies loaded in it, like the fonts.

    Best wishes,

    Nicolas

    Thread Starter wprox

    (@wprox)

    Thanks Nicolas, all set with the logo.

    One remaining question from your answer above re adding more links to the checkbox text:
    “Use the example at https://gist.github.com/New0/2faa2158fb7bb4209a0d3f6b165e1fec&#8221;

    I’m not exactly sure what I need to edit there:

    This is clear:
    – if( $button_id !== ‘MyButtonID’) { //EDIT MyButtonID to be the Button CSS ID set in the button settings
    – replace href=”https://domain.ext/privacy-policy&#8221; with href=”my url privacy policy”

    Does everything else just stay as is?

    Do I do anything with ‘theme-or-plugin-slug’?

    I have 3 buttons that will all have the same text / links next to their respective checkbox inside their respective column in a 3 column pricing table.
    So, would I copy that snippet into my functions.php 3 times, once per button?

    Or just one snippet with some sort of array: if( $button_id !== (‘MyButtonID1’, ‘MyButtonID2’, ‘MyButtonID3’) ) ?

    Thank you ??

    Plugin Author Nicolas Figueira

    (@nahuelmahe)

    Hello @wprox,

    Thank you again for using Direct Stripe.

    I indicated the parts you need to edit for this to work, then you will also need to adapt the content part to match the text and number of links you need ( lines 12 to 15 ).

    The theme-or-plugin-slug is usefull for translation, if you use this code in the functions.php file of a (child-)theme, use the (child-) theme slug and the text will be available for translations.

    I commented the Gist for an example of how you can use the code for multiple buttons.

    I hope this will help,

    Best wishes,

    Thread Starter wprox

    (@wprox)

    Thanks Nicolas, got it to work and nice addition to edit the T&C error message in the new plugin update ??

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Can’t create button’ is closed to new replies.