updated js for using affirm checkout on button clicks