I'm using Expression Engine's exp-resso store plugin for our ecommerce store. I've set it up to use PayPal Pro as our on site payment gateway.

When submitting my form I receive this error "CreditCardType : Invalid Parameter"

Am I missing something obvious? Wouldn't the card type be set automatically depending on the card number? Do I need to explicitly place a select with card type options? Here's my current form:

<input type="text" id="payment_card_no" name="payment[card_no]" value="" />
<input type="text" id="payment_name" name="payment[name]" value="" />
<select id="payment_exp_month" name="payment[exp_month]" style="width:auto">
    <option value=""></option>
<option value="01">01</option>
<select id="payment_exp_year" name="payment[exp_year]" style="width:auto">
    <option value=""></option>
    <option value="2013">2013</option>
<input type="text" id="payment_csc" name="payment[csc]" value="" class="input-mini" />
<input id="checkout_submit" type="submit" name="submit" value="Place Order" class="btn btn-success" />

Thanks in advance!


You also need to include the card type when sending the information over to Paypal. This needs to be templated as a select menu. Use this as a starting point and remove any card types which you don't accept:

<select name="payment[card_type]">
    <option value="">Select one...</option>
    <option value="visa">Visa</option>
    <option value="mastercard">MasterCard</option>
    <option value="amex">American Express</option>
    <option value="discover">Discover</option>
    <option value="maestro">Maestro (UK)</option>
    <option value="solo">Solo (UK)</option>

Once that's included and sent across in the submission it should solve the error.

| improve this answer | |

This variable should be optional per the developers guide. Which API call are you specifically using, I am assuming the DoDirectPayment API. Also are you testing this against the live site or the sandbox? Look at your raw request that you are sending out, the only other thing I can think of is that your cart is passing over the variable "CREDITCARDTYPE" but setting the value to "null" since you are not populating it which can cause the error.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy