PayPack supports adding a Payment link to NetSuite's Advance PDF/HTML template. This type of template is found under Customization > Forms > Advance PDF/HTML Templates.
To add the Payment Link Field to this form:
- Open the form you would like to add the payment link too
- Navigate to the section where you want to add the payment link
- Click the "plus" button
- Search for "PayPack Payment Link" or "PayPack Payment Link (Plain Text)"
If you would like to add a Payment Link to a button, you will need to add the field ID, custbody_nm_stripe_charge_pt_lnk_plain, to the source code of your document:
This is an example of the document when it is ready to be sent:
To simply display a click here to pay link, use the sample syntax.
<#if record.custbody_nm_stripe_charge_pt_lnk_plain?has_content>
<a href="${record.custbody_nm_stripe_charge_pt_lnk_plain}" rel="link">Click Here to Pay</a>undefined
</#if>To display a pay now button, use the sample syntax.
<#assign rawLink=record.custbody_nm_stripe_charge_pt_lnk_plain>
<#assign paymentLink=rawLink?replace('.*href="([^" ]+)".*', '$1' , 'r' )>
<table class="payhere" style="width: 100%; margin-top: 10px; margin-bottom: 20px;">
<tr>
<td align="left" style="text-align:center;">
<div style="margin-left: 0px; padding: 0px 20px; display: inline-block; background-color: #635BFF; color: white; font-weight: bold; border-radius: 5px !important; font-size: 18px;">
<a href="${paymentLink}" style="text-decoration: none;">Pay Now</a>
</div>
</td>
</tr>
</table>To display the PayPack customer portal link instead of a payment link for customers with a recurring payment schedule, use the below NetSuite PDF/HTML form syntax.
<#if record.entity.custentity_nm_stripecharge_pay_schedule=="Recurring">
<a href="${record.entity.custentity_pp_stripe_cust_port_lnk}" rel="link">Click Here to Update Payment Method</a>
<#else>
<a href="${record.custbody_nm_stripe_charge_pt_lnk_plain}" rel="link">Click Here to Pay Invoice Online</a>undefined
</#if>