diff --git a/modules/checkout/includes/commerce_checkout.pages.inc b/modules/checkout/includes/commerce_checkout.pages.inc
index 6a898e0..f7435f9 100644
--- a/modules/checkout/includes/commerce_checkout.pages.inc
+++ b/modules/checkout/includes/commerce_checkout.pages.inc
@@ -315,7 +315,7 @@ function commerce_checkout_form_submit($form, &$form_state) {
   }
 
   // If the form was submitted via the continue button...
-  if ($form_state['values']['op'] == $form_state['values']['continue']) {
+  if (end($form_state['triggering_element']['#array_parents']) == 'continue') {
     // If there is another checkout page...
     if ($checkout_page['next_page']) {
       // Update the order status to reflect the next checkout page.
diff --git a/modules/payment/includes/commerce_payment.forms.inc b/modules/payment/includes/commerce_payment.forms.inc
index 1fa017f..0ce2bbc 100644
--- a/modules/payment/includes/commerce_payment.forms.inc
+++ b/modules/payment/includes/commerce_payment.forms.inc
@@ -188,7 +188,7 @@ function commerce_payment_order_transaction_add_form_payment_terminal_validate($
 function commerce_payment_order_transaction_add_form_validate($form, &$form_state) {
   // If the button used to submit was not the "Add payment" button, give the
   // payment method a chance to validate the input.
-  if ($form_state['values']['op'] != t('Add payment')) {
+  if (end($form_state['triggering_element']['#array_parents']) != 'add_payment') {
     $payment_method = $form_state['payment_method'];
     $order = $form_state['order'];
 
@@ -204,7 +204,7 @@ function commerce_payment_order_transaction_add_form_validate($form, &$form_stat
  */
 function commerce_payment_order_transaction_add_form_submit($form, &$form_state) {
   // If the "Add payment" button was clicked...
-  if ($form_state['values']['op'] == t('Add payment')) {
+  if (end($form_state['triggering_element']['#array_parents']) == 'add_payment') {
     // Store the payment method in the form state and rebuild the form.
     $form_state['payment_method'] = commerce_payment_method_instance_load($form_state['values']['payment_method']);
     $form_state['rebuild'] = TRUE;
