How to process payment before submit form?