Commit 166f68ea by Clinton Blackburn

Updated basket page button handling

Pulling the processor name from the data attribute instead of the value attribute. It is unclear if the value attribute works as expected for button elements. Given that we know data attributes definitely work, we will use it.

ECOM-6155
parent 325c3efe
......@@ -85,7 +85,7 @@ define([
var $btn = $(e.target),
deferred = new $.Deferred(),
promise = deferred.promise(),
paymentProcessor = $btn.val(),
paymentProcessor = $btn.data('processor-name'),
data = {
basket_id: basketId,
payment_processor: paymentProcessor
......
......@@ -229,10 +229,9 @@
<button data-track-type="click"
data-track-event="edx.bi.ecommerce.basket.payment_selected"
data-track-category="checkout"
data-processor-name="{{ processor.NAME }}"
data-processor-name="{{ processor.NAME|lower }}"
data-course-id="{{ course.id }}"
class="btn payment-button"
value="{{ processor.NAME|lower }}"
id="{{ processor.NAME|lower }}">
{% if processor.NAME == 'cybersource' %}
{% trans "Checkout" %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment