Resolved csrf error...it was because I hand coded the payment form instead of using form_tag