SFCC Cartridge
...
PayPal Transactions
PayPal Pipelines [DEPRECATED]
17 min
(deprecated) paypal pipelines overview the diagrams and instructions below outline how to integrate the forter cartridge so that you're able to send information about the paypal account associated with the customer or transaction and receive a real time forter decision update site preferences when integrating with paypal, we recommend modifying your paypal cartridge settings to do this, go to site preferences > customer site preference groups this will allow the forter cartridge to receive relevant information to decision whether a paypal transaction is captured or voided please note we do not handle billing agreement checkout flow in this example set authorization the express checkout should include authorization before forter is called this can be done by setting the payment action to "authorization" or by setting run authorization in case of order to yes send sfcc billing info make sure the paypal cartridge is set to send to salesforce commerce cloud the billing information please note this configuration may need external permissions added by paypal support to your paypal account configure the paypal pipelines the diagrams below are from the paypal express authorize pipeline after the committransaction is called forter requests additional information about the transaction from paypal by triggering the paypal gettransactiondetails api call after the details are stored forter api is called in order to provide a decision on the order review your current pipelines the diagrams below are from the paypal express authorize pipeline after the "committransaction" is called forter requests additional information about the transaction from paypal by triggering the paypal gettransactiondetails api call after the details are stored forter api is called in order to provide a decision on the order based on the forter decision and the forter cartridge configuration, additional api calls are made to paypal in order to capture or void the order as needed based on the forter decision and the forter cartridge configuration, additional api calls are made to paypal in order to capture or void the order as needed 1\) assign node isauthorized add an assign node set from 0 to true ; to 0 to isauthorized 2\) add a decision node set decision key add a decision node set decision key to doexpresscheckoutresponsecontainer data paymentinfo 0 pendingreason === 'order' 3\) add assign node doauthorizationresponsecontainer data transactionid ’ add an assign node set from 0 to doauthorizationresponsecontainer data transactionid ; to 0 to transactionid 4\) add assign node to transactionid add an assign node set from 0 to doexpresscheckoutresponsecontainer data paymentinfo 0 transactionid ; to 0 to transactionid 5) add call node paypal gettransactiondetails add a call node set pipeline to paypal gettransactiondetails 6) add assign node in paypaltransactiondetails add an assign node set from 0 to gettransactiondetalisresponsecontainer ; to 0 to paypaltransactiondetails 7) add script node to fortercallstoreresponse ds add a script node set scriptfile to int forter\ pipelets/forter/fortercallstoreresponse ds ; paymentinstrument to paymentinstrument ; responsedatacontainer to paypaltransactiondetails ; responsetype to paypal transaction details response 8) add a script node to fortercallvalidate ds add a script node set scriptfile to int forter\ pipelets/forter/fortercallvalidate ds ; order to order ; jsonresponseoutput to forterresponse ; placeordererror to placeordererror 9\) set decision keys add a decision node set decision key to forterresponse jsonresponseoutput processoraction === 'skipcapture' || forterresponse jsonresponseoutput processoraction === 'notreviewed' 10\) set additional decision keys add a decision node set decision key to forterresponse jsonresponseoutput processoraction === 'disabled' || forterresponse jsonresponseoutput processoraction === 'internalerror' || forterresponse jsonresponseoutput processoraction === 'capture' 11) set payment status to completed add a decision node set decision key to doexpresscheckoutresponsecontainer data paymentinfo 0 paymentstatus === 'completed' 12\) add assign node to update payment details add an assign node set from 0 to new object() ; from 1 to paypaltransactiondetails data amt ; from 2 to paypaltransactiondetails data transactionid ; from 3 to "complete" ; from 4 to paypaltransactiondetails data currencycode ; from 5 to paypaltransactiondetails data invnum ; from 6 to "forter auto capture note" ; to 0 to paypaldocapture ; to 1 to paypaldocapture amount ; to 2 to paypaldocapture authorizationid ; to 3 to paypaldocapture completetype ; to 4 to paypaldocapture currency ; to 5 to paypaldocapture invnum ; to 6 to paypaldocapture note ; 13) add a call node set pipeline to paypal docapture add a call node set pipeline to paypal docapture 14) set scriptfile to fortercallstoreresponse ds add a script node set scriptfile to int forter\ pipelets/forter/fortercallstoreresponse ds ; paymentinstrument to paymentinstrument ; responsedatacontainer to docaptureresponsecontainer ; responsetype to paypal capture response 15) add script node to updateordertransaction ds add a script node set scriptfile to int paypal\ data/updateordertransaction ds ; iscustomorder to false ; methodname to "docapture" ; orderno to order orderno ; transactionid to docaptureresponsecontainer data get('transactionid') || docaptureresponsecontainer data get('authorizationid') || docaptureresponsecontainer data get('refundtransactionid') 16\) add some more assign nodes! add an assign node set from 0 to new object(); from 1 to paypaltransactiondetails data transactionid from 2 to "auto void forter" to 0 to paypaldovoid ; to 1 to paypaldovoid authorizationid ; to 2 to paypaldovoid note ; 17) set pipeline to paypal dovoid add a call node set pipeline to paypal dovoid 18\) update void response pipelets add a script node set scriptfile to int forter\ pipelets/forter/fortercallstoreresponse ds ; paymentinstrument to paymentinstrument ; responsedatacontainer to dovoidresponsecontainer ; responsetype to "paypal void response" 19) add script node to updateordertransaction ds add a script node set the following scriptfile to int paypal\ data/updateordertransaction ds ; iscustomorder to false ; methodname to "dovoid" ; orderno to `order orderno’; transactionid to dovoidresponsecontainer data get('transactionid') || dovoidresponsecontainer data get('authorizationid') || dovoidresponsecontainer data get('refundtransactionid') the forter cartridge has built in functionality for saving the paypal api responses – the transaction details, capture, void, authorization and expresscheckout responses the data is stored as a json string in the custom attribute of the order payment instrument object each response is saved to its dedicated custom attribute the recommended type for these custom attributes is text since in some cases the response is over 4k characters in order to save the paypal response a script node must be added in the place where the required data exists for example paypal transaction details may be saved right after a call to payppal gettransactiondetails and passed into the int forter\ pipelets/forter/fortercallstoreresponse ds script in the script dictionary input, the “paypal transaction details response” is actually the type of the response custom attribute, paypaltransactiondetails this data point is an object that contains information about the current transaction and paymentinstrument is your current payment instrument