Setup

Previous  Next |  Direct link to this topic

After installing and setting up B1 iPayment you have the option to modify the B1P&D email body in the Report action or Directly in the Crystal Report to include "Add one-time Credit Card" and "Pay now" links. This allows you to send out emails that contain a link where the customer can associate the Credit Card details with a specific document in SAP, or pay an invoice in SAP.

The keywords will allow you to send out emails automatically that contain a link for adding the Credit Card information or for paying an invoice.

 

Key Words - Add one-time Credit Card

Description

$[IPAYMENT_ONETIMELINK]

This keyword will be replaced with a link to the gateway or an empty string if iPayment cannot create the link. The link will allow for the customer to add the Credit Card information in a secure environment that will then be captured back into SAP by the iPayment server component.

$[IPAYMENT_CAN_CREATE_ONETIMELINK]

This keyword will be replaced with either an Y or a N depending on if iPayment can generate a link for the document that is getting processed. This will return N if the document is closed, already have a Credit Card associated, is not a one-time document or Business Partner or it does not have processing using Credit Card enabled (more restrictions may exist).

 

 

Key Words - Pay now

Description

$[IPAYMENT_PAYNOWLINK]

This keyword will be replaced with a link to the gateway or an empty string if iPayment cannot create the link. The link will allow for the customer to pay invoices  in a secure environment that will then be captured back into SAP by the iPayment server component.

$[IPAYMENT_CAN_CREATE_PAYNOWLINK]

This keyword will be replaced with either an Y or a N depending on if iPayment can generate a link for the document that is getting processed. This will return N if the document is closed, or the Business Partner  does not have processing using Credit Card enabled (more restrictions may exist).

 

NB: any link created last up to 30 days

NB: if a link already exists for a document the same link is used, until the link expires

 

Add credit card example:

Combining the two keywords for  add one-time credit card allows for creating a condition in the email template so that the link and text will only get shown if a link can be generated. Example:

image084

Dear $[DOCUMENT_CONTACTPERSON] <br/><br/>

Attached are your $[OBJECTNAME_BP] - $[$8.0.0]<br/><br/>

SQL

(

SELECT

CASE WHEN '$[IPAYMENT_CAN_CREATE_ONETIMELINK]' = 'Y' THEN

                            (

                                                         '<a href=''$[IPAYMENT_ONETIMELINK]''>Please add your Credit Card  information using this secure link so that we may process your order</a>. <br/> We are unable to process your order until the Credit Card information has been provided <br/><br/>'

                            )

END

)

Kind Regards<br/>

$[COMPANYNAME]

The template above (HTML body) will only show the add Credit Card link if iPayment can generate a valid link when the document is processed by B1P&D. This ensures that you can continue to use the same template trough the sales process as the Credit Card link and text will only be shown when it makes sense.

You can modify the text “Please add your Credit Card…” to match your business and you can add additional text and explanation.

Output of the configuration above is:

image086

Output when the link can no longer be generated (Sales order is closed)

image088

Pay Now example:

Combining the two keywords for  Pay now allows for creating a condition in the email template so that the link and text will only get shown if a link can be generated. Example:

image084

Dear $[DOCUMENT_CONTACTPERSON] <br/><br/>

Attached are your $[OBJECTNAME_BP] - $[$8.0.0]<br/><br/>

SQL(

SELECT CASE WHEN '$[IPAYMENT_CAN_CREATE_PAYNOWLINK]' = 'Y' THEN

(

'<a href=''$[IPAYMENT_PAYNOWLINK]''>PayNow Link</a>. <br/> You can pay for you order directly by pressing this link <br/><br/>'

)

END

)

Kind Regards<br/>

$[COMPANYNAME]

The template above (HTML body) will only show the add Credit Card link if iPayment can generate a valid link when the document is processed by B1P&D. This ensures that you can continue to use the same template trough the sales process as the Credit Card link and text will only be shown when it makes sense.

You can modify the text “Please add your Credit Card…” to match your business and you can add additional text and explanation.

Output of the configuration above is:

clip0023

Output when the link can no longer be generated (Sales order is closed)

image088

 

Crystal Report Integration

Similar to that you can use the special keywords in the Report Action you can also do the same in you Crystal Reports. Here is how to set it up:

 

Step 1: Create a new Formula Field in Crystal Report

 

clip0024

 

Step 2: Write the following Formula

clip0025

 

(for copy/paste)

 

IF('$[IPAYMENT_CAN_CREATE_PAYNOWLINK]' = 'Y') THEN

'<a href="$[IPAYMENT_PAYNOWLINK]">Pay this invoice now</a>'

 

Step 3: Add the Formula Field onto the Report

clip0027

 

Step 4: Right-click the field, Choose Format Field and Under the Paragraph Tab select Text Interpretation as HTML Text

clip0028

 

If you do this you will end up with a link in the Crystal Report / PDF that take the customer to the payment page

clip0029