using payment form

using payment form

when submit is clicked and it goes to payment, 
if the payment is not completed, the form still creates a new record.
i don't want it to create a new record unless the payment is successfully completed.
can this be done?