Giter VIP home page Giter VIP logo

Comments (2)

rikterbeek avatar rikterbeek commented on August 20, 2024

Hi @gaurav1992,

Sorry for the later reply. If you are using CSE the encrypted data needs to be passed into the additionalData field as card.encrypted.json" see below:
"additionalData": {
"card.encrypted.json": "THE ENCRYPTED DATA"
}

Regards,
Rik
Adyen

from adyen-php-api-library.

pradeep-sawant2501 avatar pradeep-sawant2501 commented on August 20, 2024

Hi wanted to integrate adyen using omnipay. getting this kind of output error (Please supply paymentDetails) ::
Array
(
[status] => 422
[errorCode] => 000
[message] => Please supply paymentDetails
[errorType] => validation
[pspReference] => 881600324956070K
)

Input passed as:

Array
(
    [additionalData] => Array
        (
            [card] => Array
                (
                    [number] => 4111111111111111
                    [expiryYear] => 2030
                    [expiryMonth] => 03
                    [holderName] => Pradeep Sawant
                )

            [billingAddress] => Array
                (
                    [city] => Columbia
                    [country] => NL
                    [houseNumberOrName] => 88
                    [street] => 
                    [postalCode] => 412
                    [stateOrProvince] => MD
                )

            [executeThreeD] => false
        )

    [amount] => Array
        (
            [value] => 150000
            [currency] => EUR
        )

    [reference] => tr388384242_12456
    [merchantAccount] => Developer914ECOM
)

My code:
echo "Gateway Name: ".$gateway->getName();
                                                                            
            $card = new CreditCard(array(
               'firstName' => 'Pradeep',
               'lastName' => 'Sawant',
               'number' => '4111111111111111',
               'expiryMonth'           => '03',
               'expiryYear'            => '2030',
               'cvv'                   => '737',
               'billingAddress1'       => '88',
               'billingCountry'        => 'NL',
               'billingCity'           => 'Columbia',
               'billingPostcode'       => '412',
               'billingState'          => 'MD',
               // 'shippingCountry'       => 'GB',
               // 'shippingAddress1'      => '88',
               // 'shippingCity'          => 'Columbia',
               // 'shippingPostcode'      => '412',
            ));

            //echo "
"; print_r($card);

            $response = $gateway->authorize(
                [
                    'amount'        => '1500',
                    'currency'      => 'EUR',
                    'transactionId' => 'tr388384242_12456',
                    'card'          => $card,
                    'merchantAccount' => 'Developer914ECOM',
                    //'description'   => 'Test Purchase',
                    //'returnUrl' => 'https://example.co.uk/sagepay-complete',
                ]
            )->send();

            echo "
"; print_r($response->getData()); die;   

from adyen-php-api-library.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.