-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* SSIG-33 : [SIG-16][BD] Implement passive mode for Pre and post auth implementations (#13) * SSIG-37 : 2nd Task - [SIG-16][BD] Implement passive mode for Pre and post auth implementations (#14) SIG-16 : Changing the attribute's name & id * SSIG-39 : [SIG-18][BD] Pre-Auth Accept/Decline Logic Change (#17) * SSIG-41 : 3rd Task - [SIG-16][BD] Implement passive mode for Pre and post auth implementations - V2 (#18) * SSIG-41 : 3rd Task - [SIG-16][BD] Implement passive mode for Pre and post auth implementations - V4 (#19) SIG-16: Updated the tags to be a single array * [Pre-auth project][BD] Batch 2 - Fulfillment + job update (#20) * SSIG-25 : Initial commit for Batch 2 * SSIG-25: Services Metadata Update * SSIG-25 - Modifications on send fulfillment logic to work with multishipping Co-authored-by: MelikeBilenn <[email protected]> * SSIG-43 : [SIG-22][BD] Bug in the code (#21) * Copy and paste the checkoutHelpers.js file * Changing the status of the export status depending on SignifydHoldOrderEnable preference. * SSIG-43 Created new cartridge for SFRA changes and extended base module to overwrite only placeOrder function on checkoutHelpers.js * SSIG-43 - Renamed the new cartridge - Updated documentation Co-authored-by: Renato Diniz <[email protected]> * SSIG-41: 3rd Task - [SIG-16][BD] Implement passive mode for Pre and post auth implementations (#22) * SSIG-41 - Updated SignifydPassiveMode custom preference default value to false * SSIG-41 - Updated documentation for passive mode * SSIG-25 : [SIG-11][BD] Create Case (v2/cases) & Fulfilment API (v2/fulfilment) Schema change (#23) - Added modifications for fulfillment API - Updated documentation for fulfillment API - Minor fixes * SSIG-25 : [SIG-11][BD] Create Case (v2/cases) & Fulfilment API (v2/fulfilment) Schema change (#24) - Updated documentation index Co-authored-by: MelikeBilenn <[email protected]> Co-authored-by: MelikeBilenn <[email protected]>
- Loading branch information
1 parent
a7a1c23
commit 82431dd
Showing
8 changed files
with
259 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>signifyd_sfra_changes</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>com.demandware.studio.core.beehiveElementBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>com.demandware.studio.core.beehiveNature</nature> | ||
</natures> | ||
</projectDescription> |
58 changes: 58 additions & 0 deletions
58
link/cartridges/signifyd_sfra_changes/cartridge/scripts/checkout/checkoutHelpers.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
'use strict'; | ||
|
||
var base = module.superModule || {}; | ||
|
||
/** | ||
* Attempts to place the order | ||
* @param {dw.order.Order} order - The order object to be placed | ||
* @param {Object} fraudDetectionStatus - an Object returned by the fraud detection hook | ||
* @returns {Object} an error object | ||
*/ | ||
function placeOrder(order, fraudDetectionStatus) { | ||
var Transaction = require('dw/system/Transaction'); | ||
var OrderMgr = require('dw/order/OrderMgr'); | ||
var Status = require('dw/system/Status'); | ||
var Order = require('dw/order/Order'); | ||
var result = { error: false }; | ||
|
||
try { | ||
Transaction.begin(); | ||
var placeOrderStatus = OrderMgr.placeOrder(order); | ||
if (placeOrderStatus === Status.ERROR) { | ||
throw new Error(); | ||
} | ||
|
||
if (fraudDetectionStatus.status === 'flag') { | ||
order.setConfirmationStatus(Order.CONFIRMATION_STATUS_NOTCONFIRMED); | ||
} else { | ||
order.setConfirmationStatus(Order.CONFIRMATION_STATUS_CONFIRMED); | ||
} | ||
|
||
|
||
/* Signifyd Modification Start */ | ||
var signifyEnabled = dw.system.Site.getCurrent().getCustomPreferenceValue('SignifydEnableCartridge'); | ||
var signifydHoldOrderEnable = dw.system.Site.getCurrent().getCustomPreferenceValue('SignifydHoldOrderEnable'); | ||
|
||
if (signifyEnabled) { | ||
if (signifydHoldOrderEnable === true) { | ||
order.setExportStatus(Order.EXPORT_STATUS_NOTEXPORTED); | ||
} else { | ||
order.setExportStatus(Order.EXPORT_STATUS_READY); | ||
} | ||
} else { | ||
order.setExportStatus(Order.EXPORT_STATUS_READY); | ||
} | ||
/* Signifyd Modification End */ | ||
|
||
Transaction.commit(); | ||
} catch (e) { | ||
Transaction.wrap(function () { OrderMgr.failOrder(order); }); | ||
result.error = true; | ||
} | ||
|
||
return result; | ||
} | ||
|
||
base.placeOrder = placeOrder; | ||
|
||
module.exports = base; |
Binary file modified
BIN
+62.1 KB
(100%)
link/documentation/Signifyd LINK Integration Documentation 20.1.0.docx
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.