Newer Version Available

This content describes an older version of this product. View Latest

Sending Transaction Information with TransactionParameter

The transaction parameter class represents a list of transaction field values that Salesforce Billing sends to the payment gateway package. You can set the class’s attributes through Salesforce Billing global API, the Payment Center, or a payment run.

For complete reference information on the TransactionParameter class’s methods and parameters, review TransactionParameter Class.

This table shows how to set TransactionParameter’s attributes for transactions made through Salesforce Billing Global API, the Payment Center, or payment runs. Billing Global API attributes are optional unless otherwise indicated.

TransactionParameter Attribute Source: Billing Global API Source: Payment Center Source: Payment Run
PaymentMethod setPaymentMethod(paymentMethod) Set by the Billing package. Set by the Billing package.
Invoice setInvoice(invoice)

Required for sending Level 2 (L2) and Level 3 (L3) parameters when making a payment against an invoice.

Level 2 includes data such as tax details and customer codes. Level 3 includes additional details such as item descriptions and quantities. Level 2 and Level 3 payment processing is used especially for B2B and B2G transactions.

Set by the Billing package for payments made against an invoice. Set by the Billing package for all payments.
InvoiceLine setInvoiceLine(line)

Sets a list of invoice lines. Required for sending L2 and L3 parameters when making a payment against one or more invoice lines.

Set by the Billing package for payments made against an invoice line. Not set.
Account setAccount(accountInstance) Set by the Billing package. Set by the Billing package.
RequestBody setRequestBody(requestBody) Set by the payment gateway package. Contains the request sent to the gateway. Set by the payment gateway package. Contains the request sent to the gateway.
FirstName setFirstName(firstName) Set by the Billing package. Set by the Billing packag.e
LastName setLastName(lastName) Set by the Billing package. Set by the Billing package.
EmailId setEmailId(emailId) Set by the Billing package. Set by the Billing package.
Street setStreet(street) Set by the Billing package. Set by the Billing package.
City setCity(city) Set by the Billing package. Set by the Billing package.
State setState(state) Set by the Billing package. Set by the Billing package.
ZIP code setZipCode(zipCode) Set by the Billing package. Set by the Billing package.
Country setCountry(country) Set by the Billing package. Set by the Billing package.
Phone setPhone(phone) Set by the Billing package. Set by the Billing package.
Amount setAmount(amount) Set by the Billing package. Set by the Billing package.
Transaction Not set Not set Set by the Billing package.
RequestingInvoiceId setRequestingInvoiceId(requestingInvoiceId) Set by the Billing package for L2 and L3 parameters. Set by the Billing package for L2 and L3 parameters.
CardCodeResponse setCardCodeResponse

Required only for reference refund transactions made through Payeezy.

Set by the Billing package for reference refunds made through Payeezy. Not set
MerchantId setMerchantId() Set by the Billing package for reference refunds made through Payeezy. Not set
GatewayId setGateway(gateway)

Sets the transaction ID for the payment. Required only for reference refund transactions.

Required to set by caller for Reference Refund transaction. It is transaction id for the payment.
Set by the Billing package as Gateway reference ID for payment. Used in reference refund transactions. Not set
CurrencyId setCurrencyId(currencyId)

Set only for transactions made through Payeezy.

Set only for transactions made through Payeezy. Set only for transactions made through Payeezy.
Gateway setGateway(gateway)

Required. Contains the ID of the Salesforce Billing payment gateway record used in the transaction.

Set by the Billing package. Set by the Billing package.
ResponseValueByKey Not set Not set. NA
Payment setPayment(paymentInstance)Required to set when calling refundTransaction. Must query all fields from the payment instance except system fields. Set by the Billing package when RefundTransaction is called. Must query all fields from the payment instance except system fields. NA

Example

1global class TransactionParameter 
2{
3    
4    global Map<string, string> mapOfResponseValueByKey = new Map<string, string>();
5    
6    // Transaction Result
7    global TransactionResult transactionResult = new TransactionResult();
8    
9    global void setTransactionUseCase(TransactionUseCase transactionUseCase) {}
10
11    global TransactionUseCase getTransactionUseCase() {}
12
13    global void setTransactionFrequencyType(TransactionFrequency transactionFrequencyType) {}
14
15    global TransactionFrequency getTransactionFrequencyType() {}
16
17    global void setIsCredentialsOnFile(Boolean isCredentialsOnFile) {}
18
19    global Boolean getIsCredentialsOnFile() {}
20
21    //Set RequestingInvoiceId
22    global void setRequestingInvoiceId(Id requestingInvoiceId) {}
23    
24    //Get RequestingInvoiceId
25    global Id getRequestingInvoiceId() {}
26
27    //Set cardCodeResponse
28    global void setCardCodeResponse(String cardCodeResponse) {}
29
30    // Get cardCodeResponse
31    global String getCardCodeResponse() {}
32
33    // Set requestingCreditCardNumber
34    global void setCardNumber(String requestingCreditCardNumber) {}
35
36    // Get requestingCreditCardNumber
37    global String getCardNumber() {}
38
39    // Set Payment
40    global void setPayment(Payment__c paymentInstance) {}
41
42    // Get Payment
43    global Payment__c getPayment() {}
44
45    // Get merchantRefId
46    global String getMerchantId() {}
47
48    //Set MerchantId
49    global void setMerchantId(String merchantId) {}
50
51    //set Gateway ID
52    global void setGateWayId(String gatewayId) {}
53
54    // Get Gateway ID
55    global String getGateWayId() {}
56    
57    // Get ResponseValueByKey
58    global Map<string, string> getResponseValueByKey() {}
59    
60    // Set Gateway
61    global void setGateWay(PaymentGateway__c gateway) {}
62   
63    // Get Gateway
64    global PaymentGateway__c getGateWay() {}
65
66    // Set PaymentMethod
67    global void setPaymentMethod(PaymentMethod__c paymentMethod) {}
68    
69    // Get PaymentMethod
70    global PaymentMethod__c getPaymentMethod() {}
71    
72    // Set Invoice
73    global void setInvoice(Invoice__c invoice) {}
74    
75    // Get Invoice
76    global Invoice__c getInvoice() {}
77
78    // Set listOfInvoiceLine
79    global void setInvoiceLine(InvoiceLine__c line) {}
80    
81    // Get listOfInvoiceLine
82    global List<InvoiceLine__c> getInvoiceLine() {}
83
84    // Set Transaction
85    global void setTransaction(PaymentTransaction__c transactionInstance) {}
86    
87    // Get Transaction
88    global PaymentTransaction__c getTransaction() {}
89    
90    // Set Account
91    global void setAccount(Account accountInstance) {}
92    
93    // Get Account
94    global Account getAccount() {}
95    
96    // Set RequestBody
97    global void setRequestBody(String requestBody) {}
98    
99    // Get RequestBody
100    global String getRequestBody() {}
101    
102    // Set FirstName
103    global void setFirstName(String firstName) {}
104    
105    // Get FirstName
106    global String getFirstName() {}
107    
108    // Set LastName
109    global void setLastName(String lastName) {}
110    
111    // Get LastName
112    global String getLastName() {}
113    
114    // Set EmailId
115    global void setEmailId(String emailId) {}
116    
117    // Get EmailId
118    global String getEmailId() {}
119    
120    // Set Street
121    global void setStreet(String street) {}
122    
123    // Get Street
124    global String getStreet() {}
125    
126    // Set City
127    global void setCity(String city) {}
128    
129    // Get City
130    global String getCity() {}
131    
132    // Set State
133    global void setState(String state) {}
134    
135    // Get State
136    global String getState() {}
137    
138    // Set ZipCode
139    global void setZipCode(String zipCode) {}
140    
141    // Get ZipCode
142    global String getZipCode() {}
143    
144    // Set Country
145    global void setCountry(String country) {}
146    
147    // Get Country
148    global String getCountry() {}
149    
150    // Set Phone
151    global void setPhone(String phone) {}
152    
153    // Get Phone
154    global String getPhone() {}
155    
156    // Set Currency Id
157    global void setCurrencyId(String currencyId) {}
158    
159    // Get Currency Id
160    global String getCurrencyId() {}
161    
162    // Set Amount
163    global void setAmount(String amount) {}
164    
165    // Get Amount
166    global String getAmount() {}
167
168}