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
Build a Credit Card Source Request object. The Credit Card Source Request object requires the following fields.
Field
Value
type
creditCard
sessionId
The payment session identifier.
owner
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');
the {
"paymentOption": {
"nickName": "My Token",
"isDefault": "true",
"sourceId": "61033d62-c0f4-4a7e-b844-07daf26ba84e"
}
}
Testing Credit Cards
An .
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 postal code and state/province data that using the state attribute. Note that the state attribute listed below corresponds to the countrySubdivision attribute used when providing address information. The payment session manages the correct field name on the backend.