Processes a credit card transaction.
<payment:useProcessor> must be called before using this tag.
All parameters and results are handled through a set of nested tags. These tags are:
- ? <payment:orderNumber> - The application-specific unique order number
- ? <payment:currencyCode> -
The 3-digit ISO 4217 currency code, defaults to
USD
- ! <payment:amount> - The amount of the payment
- ? <payment:taxAmount> - The tax amount of the payment
- ? <payment:taxExempt> -
A
true
orfalse
flag if the customer is tax exempt, defaults tofalse
- ? <payment:shippingAmount> - The shipping amount of the payment
- ? <payment:dutyAmount> - The duty amount of the payment
- ? <payment:shippingAddress> -
Provides the shipping details for the payment. Contains nested:
- ? <payment:firstName> - The shipping recipient first/given name
- ? <payment:lastName> - The shipping recipient last/family name
- ? <payment:companyName> - The shipping recipient company name
- ! <payment:streetAddress1> - The shipping street address (line 1)
- ? <payment:streetAddress2> - The shipping street address (line 2)
- ! <payment:city> - The shipping city
- ? <payment:state> - The shipping state/province/prefecture
- ? <payment:postalCode> - The shipping ZIP/postal code
- ! <payment:countryCode> - The shipping two-digit ISO 3166-1 alpha-2 country code
- ? <payment:merchantEmail> - The email address of the merchant
- ? <payment:invoiceNumber> - The invoice number of this transaction
- ? <payment:purchaseOrderNumber> - The purchase order number of this transaction
- ? <payment:comment> - An application or user provided comment for this transaction
- ! <payment:creditCard> -
Provides the credit card details. Contains nested:
- ! Must contain one of the following, but not both:
- New card:
- ! <payment:cardNumber> - The credit/debit card number
- ! Either <payment:expirationDate>
or both <payment:expirationMonth>
and <payment:expirationYear>:
- ! <payment:expirationMonth> - The expiration month (1-12)
- ! <payment:expirationYear> - The expiration year (either two or four digit format)
- ! <payment:expirationDate> -
The expiration date in either
MM/YY
orMM/YYYY
format
- ? <payment:cardCode> - The CVV2 card security code (three or four digits)
- Stored card:
- ! <payment:maskedCardNumber> - The masked (partial) credit/debit card number
- ! <payment:creditCardGUID> - The token of a stored credit card
- New card:
- ! <payment:firstName> - The cardholder's first/given name
- ! <payment:lastName> - The cardholder's last/family name
- ? <payment:companyName> - The company name on the card
- ? <payment:email> - The email address of the customer
- ? <payment:phone> - The phone number of the customer
- ? <payment:fax> - The fax number of the customer
- ? <payment:customerId> - An application-supplied customer identifier
- ? <payment:customerTaxId> - The Social Security Number (SSN) or Employer Identification Number (EIN) of the customer
- ! <payment:streetAddress1> - The billing street address (line 1)
- ? <payment:streetAddress2> - The billing street address (line 2)
- ! <payment:city> - The billing city
- ? <payment:state> - The billing state/province/prefecture
- ? <payment:postalCode> - The billing ZIP/postal code
- ! <payment:countryCode> - The card holder's two-digit ISO 3166-1 alpha-2 country code
- ? <payment:comment> - Any user or merchant comments associated with this card
- ! Must contain one of the following, but not both:
- ! <payment:process> - This is the point where the bank is contacted and the payment is processed.
- * <payment:error> -
The body of this tag will be processed when there was any type of error processing the payment.
- * <payment:getErrorReason> - Gets the reason for the error.
- * <payment:accepted> -
The body of this tag will be processed when the payment was accepted (approved).
- * <payment:getAuthorizationCode> - Gets the approval code, usually a six-character code. This may be displayed to the customer.
- * <payment:getTransactionId> - Gets the per-processor unique transaction ID. This might also be available in error and rejected states - but this is processor dependent. It is only guaranteed to be available on an accepted transaction.
- * <payment:held> -
The body of this tag will be processed when the payment has been held (pending some sort of review).
- * <payment:getReviewReason> - Gets the reason for the hold.
- * <payment:rejected> -
The body of this tag will be processed when the payment was rejected (declined).
- * <payment:getRejectedReason> - Gets the reason for the rejection - to be displayed to the user.
- * <payment:getCvvResult> - Gets the CVV2 (card security code) verification result.
- * <payment:getAvsResult> - Gets the AVS (address verification system) result.
* indicates zero or more uses allowed
? indicates zero or one use allowed
! indicates exactly one use required
Tag Information
Tag Class: | com.newmediaworks.taglib.payment.PaymentTag |
---|---|
TagExtraInfo Class: | None |
Body Content: | JSP |
Display Name: | None |
Attributes
Name | Required | Evaluation | Type | Description |
---|---|---|---|---|
capture | No | Runtime | boolean |
When
When |
test | No | Runtime | boolean |
When
When |
orderNumber | No | Runtime | String |
Provides the application-specific unique order number. A nested <payment:orderNumber> tag will override this value. |
currencyCode | No | Runtime | String |
Provides the 3-digit ISO 4217 currency code. A nested <payment:currencyCode> tag will override this value. |
amount | No | Runtime | String |
Provides the amount. A nested <payment:amount> tag will override this value. |
taxAmount | No | Runtime | String |
Provides the tax amount. A nested <payment:taxAmount> tag will override this value. |
taxExempt | No | Runtime | boolean |
Provides the tax exempt flag. A nested <payment:taxExempt> tag will override this value. |
shippingAmount | No | Runtime | String |
Provides the shipping amount. A nested <payment:shippingAmount> tag will override this value. |
dutyAmount | No | Runtime | String |
Provides the duty amount. A nested <payment:dutyAmount> tag will override this value. |
merchantEmail | No | Runtime | String |
Provides the email address of the merchant. A nested <payment:merchantEmail> tag will override this value. |
invoiceNumber | No | Runtime | String |
Provides the invoice number of this transaction. A nested <payment:invoiceNumber> tag will override this value. |
purchaseOrderNumber | No | Runtime | String |
Provides the purchase order number of this transaction. A nested <payment:purchaseOrderNumber> tag will override this value. |
comment | No | Runtime | String |
Provides the comment. A nested <payment:comment> tag will override this value. |