We will work on Apr 26th (Saturday) and will be off from Apr 30th (Wednesday) until May 2nd (Friday) for public holiday in our country

An error occurred fetching the project authors.
  1. 06 Jan, 2020 1 commit
  2. 30 Dec, 2019 1 commit
    • Rik ter Beek's avatar
      PW-1190 add magento info into request (#605) · 0efb78c7
      Rik ter Beek authored
      * PW-1190 add magento info into request
      
      * PW-1190 add unit tests and fix current ones. Add codesniffer and magento/magento-coding-standard to easy validate code within the repo. Add paypal reference as we have a depencency to paypal module as we need it for billing agreements.
      
      * [WIP] Feature/pw 1190 travis (#606)
      
      * add travis file
      
      * add credentials encrypted will only work for local branches
      
      * fix commands
      
      * add ruleset
      
      * update travis to execute all plugin code
      
      * remove params as it is declared into the ruleset. and update version codesniffer
      
      * only fail and show errors not warnings
      
      * added arguments p and n for better visibility and ignoring warning in ruleset xml
      
      * use relative path to fix local check
      0efb78c7
  3. 09 Aug, 2019 1 commit
  4. 08 Aug, 2019 1 commit
  5. 26 Jun, 2019 1 commit
  6. 21 Jun, 2019 1 commit
  7. 31 Dec, 2018 1 commit
  8. 21 Dec, 2018 1 commit
  9. 11 Dec, 2018 1 commit
  10. 29 Nov, 2018 1 commit
  11. 15 Nov, 2018 1 commit
  12. 13 Nov, 2018 1 commit
  13. 12 Nov, 2018 4 commits
  14. 09 Nov, 2018 13 commits
    • Rik ter Beek's avatar
    • Aleffio's avatar
      PW-560: changed JSON status request to array, added new total_timeout value in... · fd46e3cc
      Aleffio authored
      PW-560: changed JSON status request to array, added new total_timeout value in config, reverted serviceID to previous dateformat
      fd46e3cc
    • Aleffio's avatar
    • Aleffio's avatar
    • Rik ter Beek's avatar
      99f4ac9b
    • Rik ter Beek's avatar
    • Rik ter Beek's avatar
      Optimize request · ab65338e
      Rik ter Beek authored
      ab65338e
    • Rik ter Beek's avatar
      optimize code · 916b0cf1
      Rik ter Beek authored
      916b0cf1
    • Rik ter Beek's avatar
      store card on adyen side for pos payments · 2ac407f2
      Rik ter Beek authored
      diff --git a/Model/AdyenInitiateTerminalApi.php b/Model/AdyenInitiateTerminalApi.php
      index 464ae2e..a21c9c9 100644
      --- a/Model/AdyenInitiateTerminalApi.php
      +++ b/Model/AdyenInitiateTerminalApi.php
      @@ -22,11 +22,14 @@
        * Author: Adyen <magento@adyen.com>
        */
      
      +
       namespace Adyen\Payment\Model;
      
      +
       use Adyen\Payment\Api\AdyenInitiateTerminalApiInterface;
       use Adyen\Payment\Model\Ui\AdyenPosCloudConfigProvider;
       use Adyen\Util\Util;
      +use Magento\Payment\Gateway\Http\ClientInterface;
      
       class AdyenInitiateTerminalApi implements AdyenInitiateTerminalApiInterface
       {
      @@ -90,9 +93,7 @@ class AdyenInitiateTerminalApi implements AdyenInitiateTerminalApiInterface
      
           /**
            * Trigger sync call on terminal
      -     *
            * @return mixed
      -     * @throws \Magento\Framework\Exception\LocalizedException
            */
           public function initiate()
           {
      @@ -106,69 +107,71 @@ class AdyenInitiateTerminalApi implements AdyenInitiateTerminalApiInterface
               $poiId = $this->_adyenHelper->getPoiId();
               $serviceID = date("dHis");
               $timeStamper = date("Y-m-d") . "T" . date("H:i:s+00:00");
      +
      +        // if custom is logged in send data accross
               $customerId = $quote->getCustomerId();
      
      -        $request = [
      -            'SaleToPOIRequest' =>
      -                [
      -                    'MessageHeader' =>
      -                        [
      -                            'MessageType' => 'Request',
      -                            'MessageClass' => 'Service',
      -                            'MessageCategory' => 'Payment',
      -                            'SaleID' => 'Magento2Cloud',
      -                            'POIID' => $poiId,
      -                            'ProtocolVersion' => '3.0',
      -                            'ServiceID' => $serviceID,
      -                        ],
      -                    'PaymentRequest' =>
      -                        [
      -                            'SaleData' =>
      -                                [
      -                                    'TokenRequestedType' => 'Customer',
      -                                    'SaleTransactionID' =>
      -                                        [
      -                                            'TransactionID' => $reference,
      -                                            'TimeStamp' => $timeStamper,
      -                                        ],
      -                                ],
      -                            'PaymentTransaction' =>
      -                                [
      -                                    'AmountsReq' =>
      -                                        [
      -                                            'Currency' => $quote->getCurrency()->getQuoteCurrencyCode(),
      -                                            'RequestedAmount' => $quote->getGrandTotal(),
      -                                        ],
      -                                ],
      -                            'PaymentData' =>
      -                                [
      -                                    'PaymentType' => $transactionType,
      -                                ],
      -                        ],
      -                ],
      -        ];
      -
      -        // If customer exists add it into the request to store request
      +
      +        $newStructureValue = "";
      +//        $oldValueStructure = "";
               if (!empty($customerId)) {
                   $shopperEmail = $quote->getCustomerEmail();
                   $recurringContract = $this->_adyenHelper->getAdyenPosCloudConfigData('recurring_type');
      
      -            if (!empty($recurringContract)) {
      -                $jsonValue = '{
      +            $jsonValue = '{
                       "shopperEmail": "' . $shopperEmail . '",
                       "shopperReference": "' . $customerId . '",
                       "recurringContract": "' . $recurringContract . '"
                    }';
      
      -                $request['SaleToPOIRequest']['PaymentRequest']['SaleData']['SaleToAcquirerData'] = base64_encode($jsonValue);
      -            }
      +            $jsonValueBase64 = base64_encode($jsonValue);
      +
      +            $newStructureValue = '"SaleToAcquirerData":"' . $jsonValueBase64 . '",';
      +//            $oldValueStructure = '"SaleToAcquirerData":"shopperEmail=' . $shopperEmail . '&shopperReference=' . $customerId . '&recurringContract=' . $recurringContract . '",';
               }
      
      +        $json = '{
      +                    "SaleToPOIRequest": {
      +                        "MessageHeader": {
      +                            "MessageType": "Request",
      +                            "MessageClass": "Service",
      +                            "MessageCategory": "Payment",
      +                            "SaleID": "Magento2Cloud",
      +                            "POIID": "' . $poiId . '",
      +                            "ProtocolVersion": "3.0",
      +                            "ServiceID": "' . $serviceID . '"
      +                        },
      +                        "PaymentRequest": {
      +                            "SaleData": {
      +                                ' . $newStructureValue . '
      +                                "TokenRequestedType":"Customer",
      +                                "SaleTransactionID": {
      +                                    "TransactionID": "' . $reference . '",
      +                                    "TimeStamp": "' . $timeStamper . '"
      +                                },
      +                                "TokenRequestedType": "Customer"
      +                            },
      +                            "PaymentTransaction": {
      +                                "AmountsReq": {
      +                                    "Currency": "' . $quote->getCurrency()->getQuoteCurrencyCode() . '",
      +                                    "RequestedAmount": ' . $quote->getGrandTotal() . '
      +                                }
      +                            },
      +                            "PaymentData": {
      +                                "PaymentType": "' . $transactionType . '"
      +                            }
      +                        }
      +                    }
      +                }
      +            ';
      +
      +        $params = json_decode($json, true); //Create associative array for passing along
      +
               $quote->getPayment()->getMethodInstance()->getInfoInstance()->setAdditionalInformation('serviceID',
                   $serviceID);
      
               try {
      -            $response = $service->runTenderSync($request);
      +            $response = $service->runTenderSync($params);
               } catch (\Adyen\AdyenException $e) {
                   //Not able to perform a payment
                   $this->_adyenLogger->addAdyenDebug("adyenexception");
      2ac407f2
    • Rik ter Beek's avatar
      Optimize request · c202c694
      Rik ter Beek authored
      c202c694
    • Rik ter Beek's avatar
      optimize code · 36ae37bf
      Rik ter Beek authored
      36ae37bf
    • Rik ter Beek's avatar
      store card on adyen side for pos payments · f4c67f1f
      Rik ter Beek authored
      f4c67f1f
    • Alessio Zampatti's avatar
      PW-489 Implement terminal API (#279) · 16ca2716
      Alessio Zampatti authored
      * PW-489: Added Initiate call before placing the order
      
      * PW-489: Construct sync call request on Magento instead of on the Util Library, add encryptor on pos api key
      
      * PW-489: Removed logger/comments
      
      * PW-458: Implemented status call every 5 seconds, added timeout on Initiate call
      
      * PW-458: Fixed terminalAPI guest checkout, added configuration for pos_timeout, return immediately if response from Initiate call
      
      * PW-458: Do not show pos_timeout in config
      
      * PW-458: Retrieve quoteid from the backend, added PHP library version requirement, using settimeout instead of setinterval, removed pos_timeout from adyen_pos_cloud xml, renamed Initiate button label back to Place Order, replaced the .done().fail() flow with .always() on the frontend
      16ca2716