If you're using , you can create a payment method for your app or website in three easy steps:
Step 1: Build a Credit Card source request object
The Credit Card Source Request object requires the following fields.
Field
Value
Step 2: Create a Credit Card source using DigitalRiver.js
Create the elements
Use the DigitalRiver.js library to create and mount elements to the HTML container.
var options = {
style: {
base: {
color: "#fff",
fontFamily: "Arial, Helvetica, sans-serif",
fontSize: "16px",
}
}
}
//Create your elements
var cardNumber = digitalriver.createElement('cardnumber', options);
var cardExpiration = digitalriver.createElement("cardexpiration", options);
var cardCVV = digitalriver.createElement("cardcvv", options);
//Place the created elements on the page.
cardNumber.mount('card-number');
cardExpiration.mount('card-expiration');
cardCVV.mount('card-cvv');
To create a credit card payment source, you must reference the created element and the supplemental data in your request. DigitalRiver.js will retrieve and assemble the request on your behalf.
The address object must contain and data that .
Once authorized, you can use the source by or a for multiple uses.
See for testing instructions.
Configuring Credit Cards
Learn how to configure Credit Cards for DigitalRiver.js with Elements.