Comments (9)
Hi @BilalDev ,
Thanks for reaching out.
Which version of the cartridge are you using? Did you do any customisations?
Are you able to reproduce this issue?
Can you verify that you execute OrderMgr.failOrder() for the first transaction?
This should fail the initial order, reopen the basket and create a new order with new order no.
Thanks,
Bas Maassen
Adyen
from adyen-salesforce-commerce-cloud.
Hey @maassenbas , this is related to ticket #1726972
from adyen-salesforce-commerce-cloud.
Hello @maassenbas,
Thank you for you quick answer.
We are using a custom version of the cartridges version 19.2.2.
Unfortunately I cannot reproduce this issue. It seems that it happens randomly.
Cheers,
Bilal
from adyen-salesforce-commerce-cloud.
Hi @BilalDev ,
Checking the logs, I see multiple requests coming in for the same order.
This will be processed accordingly and send back the result for both payments.
Could you verify whether your customised code handles the resultCode correctly after a payment request?
See the default code here:
https://github.com/Adyen/adyen-salesforce-commerce-cloud/blob/19.2.2/cartridges/int_adyen_SFRA/cartridge/controllers/Adyen.js#L274
Also, if the initial payment was not successful, could you verify whether that order gets failed with OrderMgr.failOrder()?
https://github.com/Adyen/adyen-salesforce-commerce-cloud/blob/19.2.2/cartridges/int_adyen_SFRA/cartridge/controllers/Adyen.js#L299
This should reopen the basket and create a new orderNo.
This way it would not be possible to initiate two payment requests with the same orderNo.
Kind regards,
Bas Maassen
Adyen
from adyen-salesforce-commerce-cloud.
@maassenbas no customisation has been done to this file.
The resultCode is handled correctly :
if (result.resultCode == "Authorised" || result.resultCode == 'Pending' || result.resultCode == 'Received')
And the failOrder is being called line 299 when payment is not successful.
We changed this file though : cartridges/int_adyen_overlay/cartridge/scripts/job/notifications.js.
function submitOrder(order) {
var COHelpers = require('*/cartridge/scripts/checkout/checkoutHelpers');
//custom fraudDetection
var fraudDetectionStatus = {
status: 'success'
};
// Places the order
var placeOrderResult = COHelpers.placeOrder(order, fraudDetectionStatus);
if (placeOrderResult.error) {
Transaction.wrap(function () {
OrderMgr.failOrder(order);
});
return {
Order: order,
order_created: false,
error: placeOrderResult.error
};
}
try {
COHelpers.sendConfirmationEmail(order, order.customerLocaleID);
Transaction.wrap(function () {
order.custom.Adyen_CustomerEmail = null;
});
} catch (e) {
logger.warn("confirmation email not sent {0}", order.orderNo.toString());
}
//var adyenService = require('*/cartridge/scripts/adyenService');
//adyenService.submit(order);
return {
Order: order,
order_created: true
};
}
Cheers,
Bilal
from adyen-salesforce-commerce-cloud.
Hello @maassenbas,
It's still happening on our website as of today. Can we debug it together maybe?
Cheers,
Bilal
from adyen-salesforce-commerce-cloud.
Hello @maassenbas, I was able to reproduce the issue on dev sandbox.
There is a double execution of this hook : https://github.com/Adyen/adyen-salesforce-commerce-cloud/blob/19.2.2/cartridges/int_adyen_SFRA/cartridge/scripts/checkout/adyenHelpers.js#L42
I am very confused as there is only one execution of the for loop (only one paymentInstruments).
Cheers,
Bilal
from adyen-salesforce-commerce-cloud.
I think I found the problem. Our integrator added two hooks.json in our code base. One from your cartridge (int_adyen_SFRA) and another one from our custom cartridge (app_custom_lesgeorgettes) where he added another payment hook.
Do you recommend to delete hooks.json from your cartridge and add all the payment hooks on our custom cartridge?
Or let Adyen payment hooks in int_adyen_SFRA/hooks.json and add our custom payment hooks in app_custom_lesgeorgettes/hooks.json?
Cheers,
Bilal
from adyen-salesforce-commerce-cloud.
Hi @BilalDev ,
Thanks for the investigation.
I would recommend to use the payments hooks from the Adyen cartridge rather than the custom one.
Kind regards,
Bas Maassen
Adyen
from adyen-salesforce-commerce-cloud.
Related Issues (20)
- Removed .project files from cartridges HOT 4
- Fatal error when processing webhook for recurringPayment-account-xxx received HOT 1
- Missing "modal-content" Wrapper Causing Bootstrap Modal Display Issue HOT 2
- Issues with 3DS2 HOT 1
- Apple Pay Express Issues HOT 3
- TransactionType is not correctly set to 'CAPTURE' for SALE payment methods from AdyenSalePaymentMethods HOT 1
- Not able to execute "npm run compile:js" successfully HOT 4
- Adyen Payment Integration (Path Error) HOT 3
- Error while redirecting to order confirmation page when using non adyen payment HOT 7
- Cartridge can't be transpiled in production mode HOT 2
- This endpoint for Additional Details Call is not implemented under Adyen.js Controller HOT 2
- Free product causes Klarna payment to fail HOT 2
- Cannot advance in checkout process with credit card HOT 1
- Authorize Hook order vs orderNumber HOT 1
- Mismatch in payment method name for credit card payments HOT 1
- Unknown dynamic property 'adyen_payment_Adyen_Payment_Method' HOT 1
- Content type for apple domain verification file HOT 1
- Wrong Custom Preference ID reference HOT 1
- Applepay domain verification Failure for SFCC HOT 2
- Bancontact issue when the order is partailly paid with giftcard HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adyen-salesforce-commerce-cloud.