Code Monkey home page Code Monkey logo

monei-salesforce-commerce-cloud's People

Contributors

fgiampietro avatar jimmyn avatar microapps-machine-user avatar

Watchers

 avatar  avatar  avatar

monei-salesforce-commerce-cloud's Issues

order Payment status not updating

Hello,

upon successfully calling the capture endpoint for a transaction created in MONEI the payment status of the order is never updated.

in the function authorize of the file int_monei_sfra/cartridge/scripts/monei/processor.js can you add an update of the order payment status if the capture endpoint does not return any error?

if (response.err) {
        return { error: true };
}else{
        Transaction.wrap(function () {
            [...]
            order.setPaymentStatus(dw.order.Order.PAYMENT_STATUS_PAID);  // update of the order payment status
        });
}

Unknown dynamic property 'Monei_API_PaymentID'

Hello,

on authorize hook script from file int_monei_sfra/cartridge/scripts/monei/processor.js there is the line 109 where a custom attribute in the Order object is manipulated
Monei_API_PaymentID

in the xml definitions of the custom attribute, the attribute is defined as
MONEI_API_PaymentID

the difference in the attribute casing throws a 500 error. Either the attribute is defined as Monei_API_PaymentID in the XML or the code of processor.js needs to be updated to change the attribute Monei_API_PaymentID

Transaction order ID error

Hello,

during integration tests we noticed that the payment in Monei is saved using the SFCC order ID
the order ID is reserved for the whole basket duration, meaning that if the transaction for any reason is approved but returns an error (i.e. on return callback there is an error on the form) the user can't complete the checkout

consider the following flow:
1- the user fill shipping data
2- the user fill billing data without a required field
3- the user submit the payment
4- the payment is authorized
5- upon return callback, the billing form shows the error
6- the user fix the billing form data and clicks on "continue"
6- from that point on the user can't proceed forward to the next step of the checkout: the continue button always tries to authorize the transaction again which returns an error from the create payment endpoint due to the fact that the payment, identified by the order ID, is already authorized

only way for the user to use MONEI at this point is to clear cookies and create a completely new basket

there should be a flow implemented with the payment form "continue" button that checks if the payment that it is going to create is already created and if so, to check the status and if already authorized it should only go to the next step of the checkout without trying to create a new payment each time

Error flow fine tuning & credit card additional fields

Add:

Credit card additional fields in the order attributes

  • last 4 digits
  • Brand
  • Type
  • Cardholder name

Bizum additional fields in the order attributes

  • phone Number

add status code and error message with translations if applicable

Also, change MONEI_CREDIT to MONEI_CARD

Checkout controller with client-side code

Hello,

during integration test, we noticed that the controller extension Checkout.js
int_monei_sfra/cartridge/controllers/Checkout.js

contains a client-side javascript that can't be used on backend
line #96
setTimeout(function(){

setTimeout returns a 500 error for not being a valid backend code. This is not a way of doing a retry after 3 seconds on server-side javascript.

Service int_monei.http.rest returns error

Hello,

the service int_monei.http.rest upon first call always returns the following message
SSLHandshakeException:com.demandware.beehive.core.internal.ssl.WrappedCertificateException:
sun.security.validator.ValidatorException: PKIX path validation failed
java.security.cert.CertPathValidatorException: validity check failed

this happens both on sandbox and development environment, the latter with a valid SSL certificate. Seems like the API endpoint is protected not only by the authorization header but with a certificate check as well.

A mocked up API call with Postman works ok only if the option to check the SSL certificate validity is turned off

Package and webpack updates

Webpacks presents code with SFRA references
path: path.resolve('./cartridges/app_storefront_base/cartridge/static')

which should be updated with the int_monei cartridge

also:

1 package modules list should be updated to the latest version compatible of SFRA plugin and the build scope should be the entire cartridge pack instead of the single int_monei_sfra cartridge

2 static css and static js should be inserted in the git_ignore file

Cartridge linter

The cartridge linter is not working, package.json should be updated for making the lint work as well as correcting all the linting issues of the code

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.