I have a little experience programming in other languages but I am learning Javascript.
I am seeing this line
var runningAmount = 42;
var subTotalDescr = "Test Goodies";
var paymentRequest = {
currencyCode: 'USD',
countryCode: 'US',
requiredShippingContactFields: ['postalAddress','email', 'name', 'phone'],
lineItems: [{label: subTotalDescr, amount: runningAmount }],
total: {
label: 'Shoes',
amount: getTotal()
},
supportedNetworks: ['amex', 'masterCard', 'visa' ],
merchantCapabilities: [ 'supports3DS', 'supportsEMV', 'supportsCredit', 'supportsDebit' ]
};
I see that elements as subTotalDescr
and runningAmount
are other variables and getTotal()
is a function.
So, these elements will be read and compose paymentRequest
var, but what exactly is paymentRequest
? A JSON object, an associative array?
Excuse me if the question is stupid. thanks.