Fix problem with the purchase form retrieving
Refactor create_resource method
Refactor create_resource tests