Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Author syednazrulhassan

    (@nazrulhassanmca)

    Please get me site URL please

    Plugin Author syednazrulhassan

    (@nazrulhassanmca)

    There could be other fields Being required like see below the fields that are being used by the plugin

    $token_id = Stripe_Token::create(array(
     				"card" => array(
     						'number' 	     	=> sanitize_text_field(str_replace(' ','',$_POST['stripe-card-number'])),
     						'cvc' 				=> sanitize_text_field($_POST['stripe-card-cvc']),
    						'exp_month' 		=> $exp_month,
    						'exp_year' 			=> $exp_year, 
    
    						'name'  			=> $wc_order->billing_first_name.' '.$wc_order->billing_last_name,
    						'address_line1'		=> $wc_order->billing_address_1 ,
    						'address_line2'		=> $wc_order->billing_address_2,
    						'address_city'		=> $wc_order->billing_city,
    						'address_state'		=> $wc_order->billing_state,
    						'address_zip'		=> $wc_order->billing_postcode,
    						'address_country'	=> $wc_order->billing_country
    						)
    				            	      )
    						);
    
    		$charge = Stripe_Charge::create(array(
    				'amount' 	     		=> $amount,
    				'currency' 				=> $this->stripe_storecurrency,
    				'card'					=> $token_id->id,
    				'capture'				=> STRIPE_TRANSACTION_MODE,
    				'statement_descriptor'  => 'Order#'.$wc_order->get_order_number(),
    				'metadata' 				=> array(
    											'Order #' 	  		=> $order_id,
    											'Total Tax'      	=> $wc_order->get_total_tax(),
    											'Total Shipping' 	=> $wc_order->get_total_shipping(),
    											'Customer IP'	  	=> $this->get_client_ip(),
    											'WP customer #'  	=> $wc_order->user_id,
    											'Billing Email'  	=> $wc_order->billing_email,
    										   ) ,
    				'receipt_email'         => $wc_order->billing_email,
    				'description'  			=> get_bloginfo('blogname').' Order #'.$wc_order->get_order_number(),
    				'shipping' 		    	=> array(
    											'address' => array(
    												'line1'			=> $wc_order->shipping_address_1,
    												'line2'			=> $wc_order->shipping_address_2,
    												'city'			=> $wc_order->shipping_city,
    												'state'			=> $wc_order->shipping_state,
    												'country'		=> $wc_order->shipping_country,
    												'postal_code'	=> $wc_order->shipping_postcode
    												),
    											'name' => $wc_order->shipping_first_name.' '.$wc_order->shipping_last_name,
    											'phone'=> $wc_order->billing_phone
    										)
    
    			     )
    			);
    Thread Starter amq

    (@amqlit)

    i don’t use the following:

    ‘address_line1’ => $wc_order->billing_address_1 ,
    ‘address_line2’ => $wc_order->billing_address_2,
    ‘address_city’ => $wc_order->billing_city,
    ‘address_state’ => $wc_order->billing_state,
    ‘address_zip’ => $wc_order->billing_postcode,
    ‘address_country’

    can you make them optional?

    Plugin Author syednazrulhassan

    (@nazrulhassanmca)

    For the time being just comment out the lines and i will make sure to release a setting in future updates

    comment out lines and try and let me know if that works for you

    Plugin Author syednazrulhassan

    (@nazrulhassanmca)

    I am changing it to resolved now if issue occurs i will reopen ticket and sort it out for you

    when I removed “shipping” from Stripe_Charge::create I get an error “SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data”. Also I tried to leave it as an empty array. According to stripe api: “shipping optional, default is { }”

    I’m trying on test site without outer access. I’m quite advanced wp dev. Can you describe what’s the problem with shipping?

    Plugin Author syednazrulhassan

    (@nazrulhassanmca)

    let me do that on my local & get back to you

    Plugin Author syednazrulhassan

    (@nazrulhassanmca)

    Plugin Author syednazrulhassan

    (@nazrulhassanmca)

    what do you mean removed shipping you dont want to send shipping as well to stripe ?

    yes, I don’t have shipping address. It’s virtual downloadable products. Error is the same with code above

    Plugin Author syednazrulhassan

    (@nazrulhassanmca)

    ok i removed shipping from code try this one https://pastebin.com/C57AjX3y please i just checked

    Plugin Author syednazrulhassan

    (@nazrulhassanmca)

    i just checked on my setup i got this https://awesomescreenshot.com/06c56jusd1 with no shipping method enabled from woo commerce

    let me know if you still face issue

    I tried this already. Still have “SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data” on the top of checkout form.

    Plugin Author syednazrulhassan

    (@nazrulhassanmca)

    in that case i will need site access to check if you already tried this https://pastebin.com/C57AjX3y its different from previous one (both shipping billing is diabled in code)

    i am on woocommerce 2.4.6 and this plugin and it works and i sent you shot https://awesomescreenshot.com/06c56jusd1

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘"Must have at least one letter"’ is closed to new replies.