var supportedinstruments=[{
supportedmethods:'basic-card',
data:{
supportednetworks:['visa','mastercard','amex','jcb','diners','discover','mir','unionpay'],
supportedtypes: ['credit','debit']
}
}];
var details={
total:{label:'donation',amount:{currency:'usd',value:'65.00'}},
displayitems:[
{
label:'original donation amount',
amount:{currency:'usd',value:'65.00'}
}
],
shippingoptions:[
{
id:'standard',
label:'standardshipping',
amount:{currency:'usd',value:'0.00'},
selected:true
}
]
};
var options = {requestshipping: true};
try {
var request = new paymentrequest(supportedinstruments,details,options);
request.show().then(function(instrumentresponse){
})
.catch(function(err){
});
} catch (e){
}
The BasicCardRequest dictionary is a JavaScript object-structure that can be used in the Payment Request API. The properties of BasicCardRequest are defined in the Basic Card Payment spec).
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.