<p>There is most likely some error in your configuration, or what you're sending to the cart.</p>

<p>The following code (when in devMode) will show you any errors that are coming back from Commerce/Paypal when you're redirected back to the cart:</p>

<pre><code>   {# SHOW ANY ERRORS IF THERE ARE ANY! #}

{% if craft.config.devMode and (craft.session.hasFlash('commerce') or craft.session.hasFlash('notice') or craft.session.hasFlash('error')) %}

    {% set isErrors = true %}
    {% set commerceFlash = craft.session.getFlash('commerce')|join('|') %}
    {% set noticeFlash = craft.session.getFlash('notice')|join('|') %}
    {% set errorFlash = craft.session.getFlash('error')|join('|') %}

    Commerce: [{{  commerceFlash }}]
    Notice: [{{  noticeFlash }}]
    Error: [{{  errorFlash }}]

{% endif %}
</code></pre>

CC BY-SA 3.0
2017-02-20T23:14:49.557Z
Thank you, this was the debug info I needed, pointed out I was missing an email on the order (though I was hopeful paypal alone could just capture that for us).
ghoward
CC BY-SA 3.0
2017-02-20T22:59:12.287Z
2017-02-20T22:59:12.287Z
Jeremy Daalder
<p>I'm running into issues handing off a cart transaction to Paypal Express. I've set the <code>paymentMethodId</code> correctly on the cart, but when I submit to <code>commerce/payments/pay</code> I am only getting redirected to my cart page and nothing is showing in the Commerce debug logs. </p>

<p>Aside from having cart items and a paymentMethodId, is there anything else required for the Paypal handoff? How can I further debug this?</p>

<pre><code>&lt;form method="POST" id="paypal_checkout_form"&gt;
  &lt;input type="hidden" name="action" value="commerce/payments/pay"/&gt;
  &lt;input type="hidden" name="redirect" value="/thank-you?oid={{ cart.number }}"/&gt;
  &lt;input type="hidden" name="cancelUrl" value="/shop/cancel"/&gt;
  &lt;input type="hidden" name="orderNumber" value="{{ cart.number }}"/&gt;

  {{ getCsrfInput() }}
&lt;/form&gt;
</code></pre>

<plugin-craftcommerce><payment-methods><omnipay>
Handoff to Paypal Express with Craft Commerce
# Handoff to Paypal Express with Craft Commerce

(Asked by: username_0 on 2017-02-20)

I'm running into issues handing off a cart transaction to Paypal Express. I've set the paymentMethodId correctly on the cart, but when I submit to commerce/payments/pay I am only getting redirected to my cart page and nothing is showing in the Commerce debug logs. 
Aside from having cart items and a paymentMethodId, is there anything else required for the Paypal handoff? How can I further debug this?

  
  
  
  

  {{ getCsrfInput() }}

**Tags:** plugin-craftcommerce, payment-methods, omnipay

---

## 1 answers

### Answer by username_1 on 2017-02-20. Score: 2 | Accepted answer

There is most likely some error in your configuration, or what you're sending to the cart.
The following code (when in devMode) will show you any errors that are coming back from Commerce/Paypal when you're redirected back to the cart:
   {# SHOW ANY ERRORS IF THERE ARE ANY! #}

{% if craft.config.devMode and (craft.session.hasFlash('commerce') or craft.session.hasFlash('notice') or craft.session.hasFlash('error')) %}

    {% set isErrors = true %}
    {% set commerceFlash = craft.session.getFlash('commerce')|join('|') %}
    {% set noticeFlash = craft.session.getFlash('notice')|join('|') %}
    {% set errorFlash = craft.session.getFlash('error')|join('|') %}

    Commerce: [{{  commerceFlash }}]
    Notice: [{{  noticeFlash }}]
    Error: [{{  errorFlash }}]

{% endif %}

> **Comments:**
> **username_0**: Thank you, this was the debug info I needed, pointed out I was missing an email on the order (though I was hopeful paypal alone could just capture that for us).  

---

