I'm trying to use a payment gateway module (Icepay for Drupal Commerce), but I noticed that the payment method I choose in checkout influences the availability of order tokens.

I have Commerce Message configured with an email using the !order-summary token (like Commerce Kickstart does). When I choose commerce_payment_example's payment on checkout, the email contains the expected line items and total price provided by !order-summary. When I choose Icepay, this part remains empty in the email.

Could the payment method influence the availability of tokens? Is there something the payment module needs to implement for that, or should I be looking at other causes?


1 Answer 1


Of course I find the issue after posting the bounty :s

This Commerce Message issue explains that the problem is that some payment methods need to do a postback, which is executed as anonymous user. This apparently means that the view which returns the order summary (commerce_cart_summary) is also executed as anonymous and returns no results, so the token remains empty. The commerce_payment_example method does not have this problem because it doesn't rely on any external feedback.

The workaround to disable SQL rewriting in the commerce_cart_summary view works (I haven't tested the patch yet).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.