/// <summary> /// Annual Monthly Payment Charge deduction method /// </summary> /// <param name="payment">StripePayment</param> /// <param name="paymentResponse"><RecurringPaymentResponseParam/param> /// <createdby>Sumit Saurav</createdby> /// <createdDate>july/19/2014</createdDate> /// <returns>string result</returns> public static int AnnualMonthlyPaymentFailCharge(StripePayment payment, RecurringPaymentResponseParam paymentResponse) { RecurringPaymentResponseParam objRecurring = null; DecisionPointRepository decisionPointRepository = null; StripeCharge charge = payment.Charge(Convert.ToInt32(paymentResponse.Amount), "usd", paymentResponse.CustomerId, paymentResponse.Remark); string charge_id = charge.ID; StripeCharge charge_info = payment.GetCharge(charge_id); //save customer details in the database objRecurring = new RecurringPaymentResponseParam() { UserId = paymentResponse.UserId, CustomerId = paymentResponse.CustomerId, Amount = Convert.ToInt32(paymentResponse.Amount), Remark = paymentResponse.Remark, ChargeId = charge_id, }; decisionPointRepository = new DecisionPointRepository(); return(decisionPointRepository.MakeRecurringPaymentTransaction(objRecurring)); }