Skip to content

Commit

Permalink
Deprecated Api Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
DependraSethiya committed Mar 29, 2023
1 parent 63ef463 commit cadadb4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ function billing() {
// Mark step as fulfilled

app.getForm('billing').object.fulfilled.value = true;
if (currentBasket.paymentInstrument.paymentMethod !== 'KOMOJU_HOSTED_PAGE') {
if (selectedPaymentMethod.ID !== 'KOMOJU_HOSTED_PAGE') {
app.getController('COSummary').Start();
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,13 @@ function start(context) {
* account creation.
*/
function showConfirmation(order) {
var paymentMethod = order.paymentInstrument.custom.komojuPaymentMethodType;
var transactionStatus = order.paymentInstrument.custom.transactionStatus;
var currentKOMOJUPaymentInstrument = order.getPaymentInstruments('KOMOJU_HOSTED_PAGE');
var paymentMethod;
var transactionStatus;
if (currentKOMOJUPaymentInstrument.length > 0) {
paymentMethod = order.getPaymentInstruments('KOMOJU_HOSTED_PAGE')[0].custom.komojuPaymentMethodType;
transactionStatus = order.getPaymentInstruments('KOMOJU_HOSTED_PAGE')[0].custom.transactionStatus;
}
if (!customer.authenticated) {
// Initializes the account creation form for guest checkouts by populating the first and last name with the
// used billing address.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@

<input type="hidden" class="urlkomojugeturl" data-url="${URLUtils.url('KomojuController-geturl')}"
value="" />
<input type="hidden" class="selectedPaymentKomojuGeturl" data-selectedmethod="${pdict.Basket.paymentInstrument.paymentMethod}"
<input type="hidden" class="selectedPaymentKomojuGeturl" data-selectedmethod="${pdict.Basket.getPaymentInstruments()[0].paymentMethod}"
value="" />
<input type="hidden" name="${dw.web.CSRFProtection.getTokenName()}"
value="${dw.web.CSRFProtection.generateToken()}" />
Expand Down

0 comments on commit cadadb4

Please sign in to comment.