• Resolved Merc123

    (@tlawson123)


    I’m getting a validation error. It looks like it’s passing “card” as the CC type rather than “mc” or “discover.”

    
    {"name":"VALIDATION_ERROR","details":[{"field":"payer.funding_instruments[0].credit_card.type","issue":"Credit card type must be visa, mastercard, amex, jcb, or discover."}],"message":"Invalid request. See details.","information_link":"https://developer.paypal.com/docs/api/payments/#errors","debug_id":"268aa8b1ba36"}
    
    01-02-2019 @ 20:07:34 - PayPal\Api\Payment Object
    (
        [_propMap:PayPal\Common\PayPalModel:private] => Array
            (
                [intent] => sale
                [payer] => PayPal\Api\Payer Object
                    (
                        [_propMap:PayPal\Common\PayPalModel:private] => Array
                            (
                                [payment_method] => credit_card
                                [funding_instruments] => Array
                                    (
                                        [0] => PayPal\Api\FundingInstrument Object
                                            (
                                                [_propMap:PayPal\Common\PayPalModel:private] => Array
                                                    (
                                                        [credit_card] => PayPal\Api\CreditCard Object
                                                            (
                                                                [_propMap:PayPal\Common\PayPalModel:private] => Array
                                                                    (
                                                                        [type] => Card
                                                                        [number] => 55240000000000
                                                                        [expire_month] => 00
                                                                        [expire_year] => 2000
                                                                        [cvv2] => 000
                                                                        [first_name] => XXXX
                                                                        [last_name] => XXXXX
                                                                    )
Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter Merc123

    (@tlawson123)

    I have disabled all plugins except this and Woo and also used the 2019 default theme in testing. Same error exists. I have not yet upgraded to WooCommerce 5.0+. I’m still on 4.9 I believe.

    Have the same problem with Visa

    Plugin Contributor angelleyesupport

    (@angelleyesupport)

    @tlawson123 Can you tell me which payment gateway from our plugin you are using and whats the version you have installed? Is that 1.5.7?

    Can you try to update woo to 5.0 or later on a staging site and then give it another shot?

    Please check that and let me know what you got.
    Thanks!

    Thread Starter Merc123

    (@tlawson123)

    PayPal REST Credit Cards I think is what you’re asking for payment gateway and 1.5.7 is the version.

    I’m not able to do woo 5 on a staging site at this time.

    Plugin Contributor angelleyesupport

    (@angelleyesupport)

    That’s odd that you are having this issue with CC rest even though we are not getting any reports of this sort from any of our other users. Are you using CC rest with a US only account ? And you have CC rest approved by PayPal right?

    Please check that and let me know.
    Thanks!

    Thread Starter Merc123

    (@tlawson123)

    My PayPal is a US account and the card is a US card. I do have CC rest approved and the app created for it as well as the proper client ID and secret. I’ve tried Discover and MasterCard. @nextukraine seems to have the same issue with Visa.

    As I said earlier it’s not passing the credit card type, it’s simply sending card as the type.

    Is this an API call to PayPal to determine the card type?

    
    [type] => Card
    [number] => 55240000000000

    Is this applicable to REST?

    PayPal Express Checkout Billing Agreements / Reference Transactions require specific approval by PayPal. Please contact PayPal to enable this feature before using it on your site.

    Plugin Contributor angelleyesupport

    (@angelleyesupport)

    Hi @tlawson123 , @nextukraine

    I’m sure about any such issues , But We appreciate your feedback and will lookinto this further and see whats going on there.

    I will get back to you asap.
    Thanks!

    Plugin Contributor angelleye

    (@angelleye)

    @tlawson123 The message about Express Checkout Billing Agreements is unrelated to what you’re reporting here.

    @angelleyesupport did get this created in our backlog, so we’ll be reviewing this to see if we can reproduce the problem and make any necessary adjustments.

    Plugin Contributor angelleyesupport

    (@angelleyesupport)

    @angelleye Yeah, Added this to our backlog and will be looking into this soon.

    @angelleyesupport, I am seeing the issue as well, but it is only being presented with Mastercard. I did notice that in the angelleye-utility.php file, the card_type_from_account_number function uses a regex against the entire card number but in paypal-rest-api-utility.php file, the set_card_type($card_data) function only passes the first four. That regex will fail when it only sees the first four.

    • This reply was modified 5 years, 9 months ago by P Parks.
    Plugin Contributor angelleyesupport

    (@angelleyesupport)

    Hi @pjparks83 ,

    Thanks for your feedback, It’s already in our backlog, we are looking into this and will get back to you asap.

    Thanks!

    Plugin Contributor angelleye

    (@angelleye)

    @pjparks83 @tlawson123 We will be releasing an update this week that will resolve this. Thanks for the feedback!

    Thread Starter Merc123

    (@tlawson123)

    Thanks!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Invalid credit card type.’ is closed to new replies.