Saving transaction & customer info
This commit is contained in:
		@ -39,10 +39,17 @@ function stripePaymentMethodHandler(result, plan_id, api) {
 | 
			
		||||
    } else {
 | 
			
		||||
        // create a customer and subscribe to plan
 | 
			
		||||
        let payload = {
 | 
			
		||||
            product_id: document.getElementById("product_id").value,
 | 
			
		||||
            plan: plan_id,
 | 
			
		||||
            payment_method: result.paymentMethod.id,
 | 
			
		||||
            email: document.getElementById("cardholder-email").value,
 | 
			
		||||
            last_four: result.paymentMethod.card.last4,
 | 
			
		||||
            card_brand: result.paymentMethod.card.brand,
 | 
			
		||||
            expiry_month: result.paymentMethod.card.exp_month,
 | 
			
		||||
            expiry_year: result.paymentMethod.card.exp_year,
 | 
			
		||||
            first_name: document.getElementById("first-name").value,
 | 
			
		||||
            last_name: document.getElementById("last-name").value,
 | 
			
		||||
            amount: document.getElementById("amount").value,
 | 
			
		||||
        };
 | 
			
		||||
 | 
			
		||||
        const requestOptions = {
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user