1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice

Problems with settings for Stripe

Discussion in 'Community' started by mvdw310, Jul 27, 2019.

  1. mvdw310

    mvdw310 New Member

    Level: Community
    Dear All,

    Is there a workaround for the settings of a Stripe payment service.
    I'm stuggling with this for a while.

    I can't find why I can't make the payment thru Stripe.

    I hope there some information for setting up this.

    Grtz Manfred
     
  2. troester

    troester Well-Known Member Staff Member

    Level: Community
    What do you mean with "workaround"?

    See the tooltips in the stripe form plugin for settings.
     
  3. mvdw310

    mvdw310 New Member

    Level: Community
    I'm Try to make a payment option for our new site with Strike, but I can't get it working.

    When I push the send button after filling the form I don't go to the Stripe Website.
    Also the value at the and of the form is getting € 0,00 als result.

    because of this I was curious if there is a workaround for this, so I can find out what I'm doing wrong.
     
  4. troester

    troester Well-Known Member Staff Member

    Level: Community
    Did you configure the stripe form plugin correctly?
    Which exact Joomla and Fabrik versions are you running?
    I think you must use a recent GitHub version, there have been some fixed since the last official Fabrik release 3.9.

    What are your settings (screenshots)?
     
    Last edited: Jul 28, 2019
  5. mvdw310

    mvdw310 New Member

    Level: Community
    I hope so, but i don't know.
    Joomla version : 3.9.10
    Fabrik version : 3.9 (including the Git update)
    What are your settings (screenshots)?[/QUOTE]

    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
     
    Last edited by a moderator: Jul 28, 2019
  6. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Your customer data settings don't look right, unless that table really does have the J! user ID as the primary key?

    What element types are the elements you have selected for item and cost?

    I deleted the image you posted that contained your Stripe keys. I strongly suggest you regenerate a new key pair, and delete the ones you posted. If any malicious person saw those, they could own your Stripe account.

    -- hugh
     
  7. mvdw310

    mvdw310 New Member

    Level: Community
    So if I understand right, you can only make a payment thru Stripe with Joomla registered users ?

    Thanks for the tip to chance the keys.
     
  8. mvdw310

    mvdw310 New Member

    Level: Community
    I have finally found a problem, I have a calculated form field.
    When a file in a static amount the plugin is started to work.
    Is it possible to use a calculated price or only static price ?
     
  9. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    What do you mean by "a calculated form field"? A calc element?

    -- hugh
     
  10. mvdw310

    mvdw310 New Member

    Level: Community
    Sorry, Yes a Calc Element
     
  11. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    I don't think a calc will work for that, as I think the Stripe code runs before the calc element code, although I'd have to do some testing to be sure.

    But if you are calculating the cost, the best bet is to use the eval'ed cost option in the Stripe plugin, and do the calculation there. You have access to the $formModel->formData[] array with all the submitted data in it.

    -- hugh
     
  12. mvdw310

    mvdw310 New Member

    Level: Community
    Hmm then I have to search how that works haha, I was already glad that I got Fabrik to work how I want.
     
  13. mvdw310

    mvdw310 New Member

    Level: Community
    Below my calc element , is there someone who can point me in the right direction to use the $formModel code ?

    $costs = (((int)'{aanmelden___ontbijt_raw}' * (int)'{aanmelden___personen}' + 2500) + (int)'{aanmelden___t_shirt_raw}') /100;
    return ($costs) .' ';

    Many thanks in front
     
  14. troester

    troester Well-Known Member Staff Member

    Level: Community
  15. mvdw310

    mvdw310 New Member

    Level: Community
    Thanks Troester, i go read en try to understand, i'm quit new ad PHP so i hope i understand this information
    If not i will return
     
  16. mvdw310

    mvdw310 New Member

    Level: Community
    After a half day trying, reading, trying, reading, i stil don't get it to work.
    i think i'm doing something wrong, but i can't find what.

    Below the code :

    $ontbijt = $formModel->getElementData('aanmelden___ontbijt_raw');
    $personen = $formModel->getElementData('aanmelden___personen');
    $t_shirt = $formModel->getElementData('aanmelden___t_shirt_raw');

    $total = ((($ontbijt * $personen) + $t_shirt + 2500) / 100);

    $formModel->updateFormData("aanmelden___stripe", $total, true);

    i hope someone will help en explain what i'm doing wrong.

    grtz Manfred
     
  17. mvdw310

    mvdw310 New Member

    Level: Community
    I still trying to get the above code to work and find some problems
    I have on this moment 2 problems.

    1. the answer of the above is not placed in the Stripe app.
    2. this calculation is done before a client has filed the form and not after he press the button to send the form.

    with the code below added to the code i got the 25 answer, this is a part of the answer
    Code (Text):
    echo "<pre>";print_r($total);exit;
    I have set the stripe plugin
    in - Frontend
    On - New (on change is not working)

    i hope someone can help
     
  18. troester

    troester Well-Known Member Staff Member

    Level: Community
    Where are you running this code, in the Stripe plugin (where exactly) or a php plugin?
    I don't have a Stripe account but @cheesegrits said
    So in the Stripe plugin, Price tab, Cost field (with Eval=YES) it should be something like

    $ontbijt = $formModel->formData['aanmelden___ontbijt_raw'];
    ...
    return (float)$total;
     
  19. mvdw310

    mvdw310 New Member

    Level: Community
    I run this code in the Stripe plugin, Price tab, Cost field (with Eval=YES).

    I have don the Above and now I get a response of the code in de Cost field, but no calculation is made on submit.

    is there a way I can check the code,
    I have tried the echo print option, but this is run before the app have to do something, so the answer of this piece of code is 25 (last piece of the calculation).

    What I think is that de App doesn't update the strings after submitting the form.

    Thnks al lot for all the help
     
  20. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Have you tried using jdump?

    https://github.com/mathiasverraes/jdump/downloads

    Jdump allows you to dump variables without exiting, they show in a popup in the browser on the next page load. So you can see variables from page load and submit.

    -- hugh
     

Share This Page