Since 2012, the online lender Affirm has sought to chip away at credit cards’ dominance in consumer lending by offering point-of-sale installment loans on everything from bicycles to test-preparation courses....