This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 4

Stripe


  1. mbs
    Member

    Currently Machforms posts Description to Stripe as eg Payment for (Form #12249 - Entry #25), Can this be made more meaningful such as form name or text field from form so that an email from Stripe means something to the end user

    thanks

    Posted 10 years ago #
  2. yuniar

    Currently there is no way to easily change that description from the interface.
    However, you can edit the "payment_submit_stripe.php" file directly and tweak the code there further.

    The line that set the price name is this one:

    $charge_desc = "Payment for (Form #{$form_id} - Entry #{$payment_record_id})";

    should be located around line 290. I suppose you could add some conditions to that line, so that for a specific form it will use your own preferred price name. like this:

    if($form_id == 12249){
       $charge_desc = "Payment for Registration Form";
    }else{
       $charge_desc = "Payment for (Form #{$form_id} - Entry #{$payment_record_id})";
    }

    MachForm Founder

    Posted 10 years ago #
  3. MBS77
    Member

    Thanks Yuniar, how would I put this into an array to handle multiple forms?

    Thanks Mark

    Posted 10 years ago #
  4. yuniar

    You can change it like this:

    if(in_array($form_id,array('12249','12259','12269'))){
        $charge_desc = "Payment for Registration Form";
    }else{
        $charge_desc = "Payment for (Form #{$form_id} - Entry #{$payment_record_id})";
    }

    MachForm Founder

    Posted 10 years ago #

RSS feed for this topic

Reply