장고 전자 상거래 페이지의 결제 양식을 작성하면 저장된 신용 카드 정보를 처리하는 상황에 처했습니다.html <input type = hidden> 값을 덮어 씁니다.
내 서버에 어떤 작업을 신호로 보내고 싶으면 첫 번째 입력과 버튼을 자체 양식으로 포장해야합니까? 또는 아래 코드를 사용할 수 있습니까?
{% if user.is_authenticated and user.get_profile.stripe_customer_id %}
<input type="hidden" name="action=" value="delete_card"/>
<button type="submit">Use Another Card</button>
<input type="hidden" name="action=" value="pay_saved_card"/>
{% endif %}
좋은 생각이라고 생각하지 마십시오. 사용자가 입력 필드에 'enter'키를 누르면 어떻게됩니까? –