Giter VIP home page Giter VIP logo

magento-2-latest's People

Contributors

drevidchuck avatar eugeniy-borisevich avatar jackie-od avatar jude-laybuy avatar nikolai-overdose avatar quangdo-aligent avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

magento-2-latest's Issues

Magento 2 Invoice email not sent to notify customer?

This could be by design however, as LayBuy would send their own?
But Magento 2 does have a built in Invoice email that should be sent to the Customer and any Bcc'd emails (e.g. sales staff that need to be notified of the paid invoice/order to process it).

https://github.com/Laybuy/Magento-2-Latest/blob/master/Model/Laybuy.php#L409

My thinking is that Laybuy.php createInvoiceAndUpdateOrder should use an invoiceSender
https://github.com/pepe1518/magento2/blob/master/vendor/magento/module-sales/Model/Order/Email/Sender/InvoiceSender.php

https://www.rakeshjesadiya.com/how-to-create-invoice-programmatically-in-magento-2/

\Magento\Sales\Model\Order\Email\Sender\InvoiceSender $invoiceSender,
$this->invoiceSender->send($invoice);

Does not use special price when calculating.

image

image

Should take special price into account.
Could have sworn this used to just be phtml/block but there is JavaScript in there now.

var price = Math.min.apply(null, $('.price-wrapper',this).map(function(){
  return $(this).data('price-amount')
}).get());

Would something like that work?
Or should it be more explicit?

Cart seems fine as it takes from Total just Product and Category have the issue.

Installment prices on simple products with Customizable Options are calculated incorrectly

Using Magento 2.3.2
With this extension installed, any of my products with Customizable Options calculate the installments at $0.17 each, despite the price originally showing correctly.

Customizable Options have the value of + $0.00 - However when they are set to 100%, selecting an option changes the installments from $0.17 to $0.33.

During page load the correct installments show, but then they're overwritten before the user can interact with the page.

Couldn't initialize Laybuy payment method

I have installed Module on Magento2.1.17 its display on payment method list but when i place order it will redirect to me on checkout cart page with error message "Couldn't initialize Laybuy payment method." can any one help me solve this out.

This is laybuy log:
[2019-07-14 09:31:43] Laybuy Logger.DEBUG: array (
'Laybuy\Laybuy\Controller\Payment\Process::execute' => 'start',
) {"is_exception":false} []
[2019-07-14 09:31:43] Laybuy Logger.DEBUG: array (
'Laybuy\Laybuy\Model\Laybuy::createLaybuyOrder CREATED ORDER' =>
stdClass::__set_state(array(
'amount' => '384.99',
'currency' => 'GBP',
'returnUrl' => 'https://www.xyz.com/laybuy/payment/response/',
'merchantReference' => '000000376',
'customer' =>
stdClass::__set_state(array(
'firstName' => 'abdul',
'lastName' => 'test',
'email' => '[email protected]',
'phone' => '00 000 000',
)),
'items' =>
array (
0 =>
stdClass::__set_state(array(
'id' => 1,
'description' => '000000376',
'quantity' => 1,
'price' => '384.99',
)),
),
)),
) {"is_exception":false} []
[2019-07-14 09:31:43] Laybuy Logger.DEBUG: array (
'Laybuy\Laybuy\Controller\Payment\Process::execute LAYBUY STATUS ' => 'FAILED',
) {"is_exception":false} []

Invoice number not sent in emails.

Invoice number not sent in Invoice emails yet other payment methods do have it.

image

composer.json shows me
name: "laybuy/laybuy"
Version: 0.1.0

Place to look possibly Model/Laybuy.php in sendOrderEmail function.

Successful payment but order was not saved in Magento 2 due to Timeout communicating with Laybuy.

No order created in Magento 2 but payment made on Laybuys end.
You have no try catches or handling of errors!

So when there is a REST API timeout during a checkout such as in method laybuyConfirm used in execute method the inside code of your condition is not executed as everything bombs out, yet the payment was successfully captured on Laybuys end.

The default timeout for Zend Http Client is 10 seconds.
https://framework.zend.com/manual/1.12/en/zend.http.client.html

Maybe this could also be set higher as a work-around?
I'm not sure what caused it to not complete in that time but it happened.

Possible work-around, but really should have error handling.
Laybuy\Gateway\Http|\RestClient.php set a timeout.

    /**
     * Gets the HTTP client object.
     *
     * @return \Zend_Http_Client
     */
    final public static function getHttpClient()
    {
        if (!self::$_httpClient instanceof \Zend_Http_Client) {
            self::$_httpClient = new \Zend_Http_Client();
            self::$_httpClient->setConfig([
                'timeout' => 60
            ]);
        }

        return self::$_httpClient;
    }

Log lines.

[2021-09-17 23:30:08] Laybuy Logger.DEBUG: array (
  'Laybuy\\Laybuy\\Controller\\Payment\\Response::execute' => 'start',
)
[2021-09-17 23:30:18] Laybuy Logger.DEBUG: array (
  'process error ' => '#0 /var/www/html/vendor/magento/zendframework1/library/Zend/Http/Client/Adapter/Socket.php(329): Zend_Http_Client_Adapter_Socket->_checkSocketReadTimeout()
#1 /var/www/html/vendor/magento/zendframework1/library/Zend/Http/Client.php(1089): Zend_Http_Client_Adapter_Socket->read()
#2 /var/www/html/app/code/Laybuy/Laybuy/Gateway/Http/RestClient.php(162): Zend_Http_Client->request(\'POST\')
#3 /var/www/html/app/code/Laybuy/Laybuy/Gateway/Http/RestClient.php(176): Laybuy\\Laybuy\\Gateway\\Http\\RestClient->_performPost(\'POST\', \'{"token":"REDACTED...\')
#4 /var/www/html/app/code/Laybuy/Laybuy/Gateway/Http/LaybuyClient.php(99): Laybuy\\Laybuy\\Gateway\\Http\\RestClient->restPost(\'/order/confirm\', \'{"token":"REDACTED...\')
#5 /var/www/html/app/code/Laybuy/Laybuy/Model/Laybuy.php(324): Laybuy\\Laybuy\\Gateway\\Http\\LaybuyClient->getLaybuyConfirmationOrderId(\'REDACTED...\')
#6 /var/www/html/app/code/Laybuy/Laybuy/Controller/Payment/Response.php(75): Laybuy\\Laybuy\\Model\\Laybuy->laybuyConfirm(\'REDACTED...\')
#7 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Laybuy\\Laybuy\\Controller\\Payment\\Response->execute()
#8 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Laybuy\\Laybuy\\Controller\\Payment\\Response\\Interceptor->___callParent(\'execute\', Array)
#9 /var/www/html/vendor/magento/framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php(51): Laybuy\\Laybuy\\Controller\\Payment\\Response\\Interceptor->Magento\\Framework\\Interception\\{closure}()
#10 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\\Framework\\App\\Action\\Plugin\\ActionFlagNoDispatchPlugin->aroundExecute(Object(Laybuy\\Laybuy\\Controller\\Payment\\Response\\Interceptor), Object($#11 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Laybuy\\Laybuy\\Controller\\Payment\\Response\\Interceptor->Magento\\Framework\\Interception\\{closure}()
#12 /var/www/html/generated/code/Laybuy/Laybuy/Controller/Payment/Response/Interceptor.php(23): Laybuy\\Laybuy\\Controller\\Payment\\Response\\Interceptor->___callPlugins(\'execute\', Array, Array)
#13 /var/www/html/vendor/magento/framework/App/Action/Action.php(111): Laybuy\\Laybuy\\Controller\\Payment\\Response\\Interceptor->execute()
#14 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\\Framework\\App\\Action\\Action->dispatch(Object(Magento\\Framework\\App\\Request\\Http))
#15 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Laybuy\\Laybuy\\Controller\\Payment\\Response\\Interceptor->___callParent(\'dispatch\', Array)
#16 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Laybuy\\Laybuy\\Controller\\Payment\\Response\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Request\\Http))
#17 /var/www/html/generated/code/Laybuy/Laybuy/Controller/Payment/Response/Interceptor.php(32): Laybuy\\Laybuy\\Controller\\Payment\\Response\\Interceptor->___callPlugins(\'dispatch\', Array, Array)
#18 /var/www/html/vendor/magento/framework/App/FrontController.php(186): Laybuy\\Laybuy\\Controller\\Payment\\Response\\Interceptor->dispatch(Object(Magento\\Framework\\App\\Request\\Http))
#19 /var/www/html/vendor/magento/framework/App/FrontController.php(118): Magento\\Framework\\App\\FrontController->processRequest(Object(Magento\\Framework\\App\\Request\\Http), Object(Laybuy\\Laybuy\\Controller\\Payment\\Response\\Inte$#20 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\\Framework\\App\\FrontController->dispatch(Object(Magento\\Framework\\App\\Request\\Http))
#21 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\\Framework\\App\\FrontController\\Interceptor->___callParent(\'dispatch\', Array)
#22 /var/www/html/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(99): Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Req$#23 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\\Store\\App\\FrontController\\Plugin\\RequestPreprocessor->aroundDispatch(Object(Magento\\Framework\\App\\FrontController\\Interceptor), Object(Closur$#24 /var/www/html/app/code/Amasty/InvisibleCaptcha/Plugin/Predispatch.php(93): Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Request\\Http))
#25 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(135): Amasty\\InvisibleCaptcha\\Plugin\\Predispatch->aroundDispatch(Object(Magento\\Framework\\App\\FrontController\\Interceptor), Object(Closure), Object(Magento\\$#26 /var/www/html/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(71): Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Reque$#27 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\\PageCache\\Model\\App\\FrontController\\BuiltinPlugin->aroundDispatch(Object(Magento\\Framework\\App\\FrontController\\Interceptor), Object(Closure),$#28 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Request\\Http))
#29 /var/www/html/generated/code/Magento/Framework/App/FrontController/Interceptor.php(23): Magento\\Framework\\App\\FrontController\\Interceptor->___callPlugins(\'dispatch\', Array, NULL)
#30 /var/www/html/vendor/magento/framework/App/Http.php(116): Magento\\Framework\\App\\FrontController\\Interceptor->dispatch(Object(Magento\\Framework\\App\\Request\\Http))
#31 /var/www/html/vendor/magento/framework/App/Bootstrap.php(263): Magento\\Framework\\App\\Http->launch()
#32 /var/www/html/pub/index.php(29): Magento\\Framework\\App\\Bootstrap->run(Object(Magento\\Framework\\App\\Http\\Interceptor))
#33 {main}',
)
[2021-09-17 23:30:19] Laybuy Logger.DEBUG: array (
  'Laybuy\\Laybuy\\Model\\Laybuy::laybuyCancelLAYBUY CANCEL STATUS:' => false,
  'TOKEN' => 'REDACTED',
)
[2021-09-17 23:30:19] Laybuy Logger.DEBUG: array (
  'method' => 'Laybuy\\Laybuy\\Gateway\\Http\\LaybuyClient::checkMerchantOrder',
  'Response' =>
  (object) array(
     'result' => 'ERROR',
     'error' => 'Order not found',
  ),
)
[2021-09-17 23:30:19] Laybuy Logger.DEBUG: array (
  'Laybuy\\Laybuy\\Model\\Laybuy::laybuyCheckOrderLAYBUY ORDER STATUS:' => false,
  'MERCHANT REFERENCE' => '000007359',
)
[2021-09-17 23:31:19] Laybuy Logger.DEBUG: array (
  'Laybuy\\Laybuy\\Controller\\Payment\\Process::execute' => 'start',
)
[2021-09-17 23:31:19] Laybuy Logger.DEBUG: array (
  'Laybuy\\Laybuy\\Model\\Laybuy::createLaybuyOrder CREATED ORDER' =>
  (object) array(
     'amount' => '279.90',
     'currency' => 'NZD',
     'returnUrl' => 'https://REDACTED/laybuy/payment/response/',
     'merchantReference' => '000007359',
     'customer' =>

Add terms and conditions block.

Error trying to order with Payment Action: Order whilst site has Terms and Conditions to check.

The order wasn't placed. First, agree to the terms and conditions, then try placing your order again.

#0 vendor/magento/module-checkout-agreements/Model/Checkout/Plugin/GuestValidation.php(78): Magento\\CheckoutAgreements\\Model\\Checkout\\Plugin\\GuestValidation->validateAgreements(Object(Magento\\Quote\\Model\\Quote\\Payment))
#1 vendor/magento/framework/Interception/Interceptor.php(121): Magento\\CheckoutAgreements\\Model\\Checkout\\Plugin\\GuestValidation->beforeSavePaymentInformationAndPlaceOrder(Object(Magento\\Checkout\\Model\\GuestPaymentInformationManagement\\Interceptor), '...', '...', Object(Magento\\Quote\\Model\\Quote\\Payment), Object(Magento\\Quote\\Model\\Quote\\Address))
#2 vendor/magento/framework/Interception/Interceptor.php(153): Magento\\Checkout\\Model\\GuestPaymentInformationManagement\\Interceptor->Magento\\Framework\\Interception\\{closure}('...', '...', Object(Magento\\Quote\\Model\\Quote\\Payment), Object(Magento\\Quote\\Model\\Quote\\Address))
#3 generated/code/Magento/Checkout/Model/GuestPaymentInformationManagement/Interceptor.php(26): Magento\\Checkout\\Model\\GuestPaymentInformationManagement\\Interceptor->___callPlugins('savePaymentInfo...', Array, Array)
#4 [internal function]: Magento\\Checkout\\Model\\GuestPaymentInformationManagement\\Interceptor->savePaymentInformationAndPlaceOrder('...', '...', Object(Magento\\Quote\\Model\\Quote\\Payment), Object(Magento\\Quote\\Model\\Quote\\Address))
#5 vendor/magento/module-webapi/Controller/Rest/SynchronousRequestProcessor.php(95): call_user_func_array(Array, Array)
#6 vendor/magento/module-webapi/Controller/Rest.php(188): Magento\\Webapi\\Controller\\Rest\\SynchronousRequestProcessor->process(Object(Magento\\Framework\\Webapi\\Rest\\Request\\Proxy))
#7 vendor/magento/framework/Interception/Interceptor.php(58): Magento\\Webapi\\Controller\\Rest->dispatch(Object(Magento\\Framework\\App\\Request\\Http))
#8 vendor/magento/framework/Interception/Interceptor.php(138): Magento\\Webapi\\Controller\\Rest\\Interceptor->___callParent('dispatch', Array)
#9 vendor/magento/framework/Interception/Interceptor.php(153): Magento\\Webapi\\Controller\\Rest\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Request\\Http))
#10 generated/code/Magento/Webapi/Controller/Rest/Interceptor.php(26): Magento\\Webapi\\Controller\\Rest\\Interceptor->___callPlugins('dispatch', Array, Array)
#11 vendor/magento/framework/App/Http.php(135): Magento\\Webapi\\Controller\\Rest\\Interceptor->dispatch(Object(Magento\\Framework\\App\\Request\\Http))
#12 generated/code/Magento/Framework/App/Http/Interceptor.php(24): Magento\\Framework\\App\\Http->launch()
#13 vendor/magento/framework/App/Bootstrap.php(258): Magento\\Framework\\App\\Http\\Interceptor->launch()
#14 pub/index.php(37): Magento\\Framework\\App\\Bootstrap->run(Object(Magento\\Framework\\App\\Http\\Interceptor))
#15 {main}"

Solution: put under billing address block.
view/frontend/web/template/payment/laybuy.html:43

        <div class="checkout-agreements-block">
            <!-- ko foreach: $parent.getRegion('before-place-order') -->
            <!-- ko template: getTemplate() -->
            <!-- /ko -->
            <!--/ko-->
        </div>

Response.php code in catch undefined variable order.

1 exception(s):
Exception #0 (Exception): Notice: Undefined variable: order in app/code/Laybuy/Laybuy/Controller/Payment/Response.php on line 176

Should possibly wrap this in an isset.

            if (isset($order)) {
                if (!$order->getId()) {
                    $this->laybuy->laybuyCancel($token);
                }
            }

There was an exception elsewhere, before $order is set.

At $quote->collectTotals();

On refresh of home page I did see notices such as.
Laybuy: There was an error confirming your order
The shipping method is missing. Select the shipping method and try again.

Add this to the catch to see error in log.

$this->logger->debug(['process error ' => $e->getMessage()]);

Investigating, we do have some conditional shipping methods based on address area and items in cart, maybe they need to always be enabled when handling the LayBuy response?

I think the shipping method is mandatory to set before collectTotals can be called, I chose one on checkout but it conditionally disappears based on the fields and/or cart items at checkout.

It used to work before I updated.

Team platform access to magento repo

slack thread: https://laybuy.slack.com/archives/C557VBNSW/p1711598098306179

Access was requested to this repo: https://github.com/laybuy/Magento-2-Latest

For the purpose of updating the plug-in to have FCA compliant price breakdown text.

It's seems that the repo does not have a code owner at the moment. We did partner with externals however that relationship is not very prevalent at the moment.

The way I see it, we are now maintaining it, most likely members of the platform team, therefore the platform team should have write access.

Laybuy Info may not be following the Mandatories on your site from the 2019 Laybuy Launch Guide

Looking at the LayBuy launch guide pdf the Popup details and wording elsewhere are different.
There is no Pay By Laybuy button on checkout etc...

Do LayBuy's mandatory requirements have to match closer than this? (It is just a guide?)

I ask because it would be a shame to have LayBuy restricted at some point in the future should the Official Magento 2 module not meet the requirements, and I think it is a positive for the branding/marketing aspect to follow the guide closer.

I'm emailing Scott, [email protected] for more info linking them this issue.

See page 8-9 "Mandatories on your site."

  • [] *It's important to show how Laybuy works as simply as possible to customers. Using simple icons and minimal text to explain, and lots of white space to keep things simple.
  • [] *The current popup does not look like their popup, branding for Laybuy including that in the popup might have to be consistent across implementations updated regarding the 2019 Guide?
    Including the symbols/icons.

Screenshots;

Laybuy Launch Guide Pages 7,8,9.
image
image
image

Footer logo?
image

Presently the Magento 2 plugin popup shows as this.
image

I've seen another website implement it differently like this. (not Magento 2 / affiliated)
image

And an older Magento 2 site using the previous Laybuy extension looked like this.
image
Clicking What's this simply redirects to https://www.laybuy.com/what-is-laybuy

image

If I recall I had to add the Pay By laybuy image into that button as well, as it was not there.

Magento 2 does not have the Pay by Laybuy button on checkout.

Payment Method when closed.
image

Payment Method when open.
image

Proposals

  • [] Move the Laybuy logo (slightly smaller?) before the payment method title, so its shown when closed, hide the method title as the image says it, set Alt tag of img correctly to read Pay by LayBuy.
  • [] Modify the Continue to Laybuy button to a Pay by Laybuy image button.
    image

E.g.
image
Resized down of course.

Source the logos from the official dropbox/download of course.

Similar, Driving Sales might be able to be implemented in an easy way into this module although this section is not mandatory and probably varies depending per each store design and modules/configuration...

Marketing/Branding

  • [] Header Banner (Implementation of this could vary depending on per site header/module implementations. See pages 11-12
  • [] Footer logo, 100px x 50px is the minimum size.
  • [] Content Banner, could be a block we can add anywhere to have consistent wording and logo across all installations.
  • [] Launch email ability to send to existing customers with the appropriate pre-formatted graphics/wording.

Nice to haves:

  • [] Support for Light/Dark logos depending on your theme it may look better.

Kind regards,
Liam

Guest user laybuy checkout redirects to cart

I have tried to place order by using guest checkout via laybuy payment method.

If I'm a guest user, I have tried to place an order by clicking laybuy button on payment method. But it redirects to cart page. This issue happened randomly.

Order email long laybuy_order_id pushes everything to the right.

Suggest to store laybuy_order_id as what is actually shown on the Laybuy Merchant screen.

Model/Laybuy.php

    /**
     * @param \Magento\Sales\Model\Order $order
     * @param $txnId
     */
    public function updatePayment(\Magento\Sales\Model\Order $order, $txnId)
    {
        $payment = $order->getPayment();
        $payment->setTransactionId($txnId);
        $parts = explode('_', $txnId);
        $laybuyOrderId = $parts[0];
        $payment->setAdditionalInformation('laybuy_order_id', $laybuyOrderId);
        $payment->save();
    }

laybuy_grand_total also seems to be pointless it is not used?

If the point is to use these for storing data to later be refunded, maybe it could store it in attributes so that they are not visible on the order emails e.g. $payment->setTransactionId is already set.

E.g.
9501271_maO03gjAYudBieBud3N0Axpalj1OR4M22G3Tqt1P

If you only set the number, it takes up much less space horizontally and the email will look okay.
image

Issue with button redirect to cart page

I have added this module in my site..
Link : http://staging.hlfashions.co.uk
on checkout page when i click proceed with Laybuy it redirect me to Cart page.. I am sharing laybuy.log with you plz help me this asap..

laybuy.log File :

[2021-10-19 07:38:03] Laybuy Logger.DEBUG: array (
'Laybuy\Laybuy\Controller\Payment\Process::execute' => 'start',
) [] []
[2021-10-19 07:38:04] Laybuy Logger.DEBUG: array (
'Laybuy\Laybuy\Model\Laybuy::createLaybuyOrder CREATED ORDER' =>
(object) array(
'amount' => '19.20',
'currency' => 'GBP',
'returnUrl' => 'http://staging.hlfashions.co.uk/laybuy/payment/response/',
'merchantReference' => '000000123',
'customer' =>
(object) array(
'firstName' => 'Test',
'lastName' => 'Test',
'email' => '[email protected]',
'phone' => '0987654321',
),
'items' =>
array (
0 =>
(object) array(
'id' => 1,
'description' => '000000123',
'quantity' => 1,
'price' => '19.20',
),
),
),
) [] []
[2021-10-19 07:38:05] Laybuy Logger.DEBUG: array (
'Laybuy\Laybuy\Gateway\Http\LaybuyClient::getRedirectUrlAndToken' =>
(object) array(
'result' => 'ERROR',
'error' => 'Authentication Failed',
),
) [] []
[2021-10-19 07:38:05] Laybuy Logger.DEBUG: array (
'Laybuy\Laybuy\Controller\Payment\Process::execute LAYBUY STATUS ' => 'FAILED',
) [] []
[2021-10-19 07:40:34] Laybuy Logger.DEBUG: array (
'Laybuy\Laybuy\Controller\Payment\Process::execute' => 'start',
) [] []
[2021-10-19 07:40:35] Laybuy Logger.DEBUG: array (
'Laybuy\Laybuy\Model\Laybuy::createLaybuyOrder CREATED ORDER' =>
(object) array(
'amount' => '19.20',
'currency' => 'GBP',
'returnUrl' => 'http://staging.hlfashions.co.uk/laybuy/payment/response/',
'merchantReference' => '000000123',
'customer' =>
(object) array(
'firstName' => 'Test',
'lastName' => 'Test',
'email' => '[email protected]',
'phone' => '0987654321',
),
'items' =>
array (
0 =>
(object) array(
'id' => 1,
'description' => '000000123',
'quantity' => 1,
'price' => '19.20',
),
),
),
) [] []
[2021-10-19 07:40:36] Laybuy Logger.DEBUG: array (
'Laybuy\Laybuy\Gateway\Http\LaybuyClient::getRedirectUrlAndToken' =>
(object) array(
'result' => 'ERROR',
'error' => 'Authentication Failed',
),
) [] []
[2021-10-19 07:40:36] Laybuy Logger.DEBUG: array (
'Laybuy\Laybuy\Controller\Payment\Process::execute LAYBUY STATUS ' => 'FAILED',
) [] []
[2021-10-19 07:48:28] Laybuy Logger.DEBUG: array (
'Laybuy\Laybuy\Controller\Payment\Process::execute' => 'start',
) [] []
[2021-10-19 07:48:30] Laybuy Logger.DEBUG: array (
'Laybuy\Laybuy\Model\Laybuy::createLaybuyOrder CREATED ORDER' =>
(object) array(
'amount' => '19.20',
'currency' => 'GBP',
'returnUrl' => 'http://staging.hlfashions.co.uk/laybuy/payment/response/',
'merchantReference' => '000000123',
'customer' =>
(object) array(
'firstName' => 'Test',
'lastName' => 'Test',
'email' => '[email protected]',
'phone' => '0987654321',
),
'items' =>
array (
0 =>
(object) array(
'id' => 1,
'description' => '000000123',
'quantity' => 1,
'price' => '19.20',
),
),
),
) [] []
[2021-10-19 07:48:31] Laybuy Logger.DEBUG: array (
'Laybuy\Laybuy\Gateway\Http\LaybuyClient::getRedirectUrlAndToken' =>
(object) array(
'result' => 'ERROR',
'error' => 'Authentication Failed',
),
) [] []

Thanks

Payment processed with failure

Trying to investigate why two Laybuy orders were not invoiced.

        $this->logger->debug([
            __METHOD__ => 'Payment processed with failure',
            'token' => $token,
            'Laybuy Order Id' => $laybuyOrderId,
            'Order Can Invoice' => $order->canInvoice(),
            'Order Should be Invoiced' => $this->shouldBeInvoiced($order)
        ]);

'Order Can Invoice' => false,
'Order Should be Invoiced' => true,

The orders are in the Canceled state now.

Why might $order->canInvoice() be returning false?
The payment was successful.

https://stackoverflow.com/questions/17493764/magento-caninvoice-always-return-false

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.