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

Sending email field to Stripe


  1. octochops
    Member

    Is there anyway to send an email field as part of the customer object to Stripe?

    or is there any reason you aren't sending it?

    Posted 10 years ago #
  2. octochops
    Member

    Upon further looking into it, it's actually extremely important that the email be passed. Especially for recurring subscriptions since Machform itself will not email a "receipt" every month there is a charge and Stripe will as long as there is an email on file.

    Posted 10 years ago #
  3. yuniar

    At this moment MachForm only send the minimum required fields by Stripe to process the payment. You'll need to update the email address within your Stripe dashboard manually for now.

    Or if you don't mind with some modifications, please contact us directly and let us know the URL of your form.
    We'll help you with the code to send the email to Stripe.

    We're looking forward to improve this.


    MachForm Founder

    Posted 10 years ago #
  4. octaviocorral
    Member

    Ended up modifying the code in case anyone is interested in the solution. Now emails are sent to stripe for recurring billing

    within payment_submit_stripe.php

    line 20 add:
    $email1 = null;

    on line 25 add the following. Be sure to replace your form ID and element # with your own:

    //grab the email if it exists. custom code
    	if($form_id == 13422){
    
    		$dbh = mf_connect_db();
    
    		//get form properties data
    		$query 	= "select element_7 from ".MF_TABLE_PREFIX."form_".$form_id." WHERE id = ".$payment_record_id;
    
    		$params = array($form_id);
    
    		$sth = mf_do_query($query,$params,$dbh);
    		//$row = mf_do_fetch_result($sth);
    
    		while($row = mf_do_fetch_result($sth)){
    			$email1 = $row['element_7'];
    		}
    
    	}

    On line 213. modify to send the email to the customer object

    try {
    			$customer_obj = Stripe_Customer::create(array(
    								"card" => $token,
    						  		"description" => $customer_desc,
    						  		"email" => $email1
                                    )
    							);
    Posted 8 years ago #
  5. budapestguide
    Member

    Hello,

    I would also need this feature in stripe to be able to send automated receipts and refund notifications with the machform + stripe combo.

    I was trying to follow Octavio's advice and add the code, but I cannot even locate this file payment_submit_stripe.php
    I went through the machform stripe folder, also found a payment stripe js in the js folder, but could not locate the payment_submit_stripe.php file.

    Lame, I know, I am not a programmer, just trying to learn and improve.
    Can anyone help please?

    Thank you,
    Anna

    Posted 8 years ago #
  6. AMurray
    Pro Member

    The file is there (at least in V 4.6).

    It might be called something else in prior versions? If you can sort the file list into alphabetical order, look for any file starting "payment_submit_" and you should find the one for Stripe.

    Otherwise post back with the ones you do see listed, or post a screenshot of the file listing.

    If need be, go back to the downloaded zip file, or get the latest one from your Members Area (for V 4.6).
    http://www.appnitro.com/members

    Posted 8 years ago #

RSS feed for this topic

Reply