Skip to content

Instantly share code, notes, and snippets.

@bnguyen06

bnguyen06/resolve_example.html Secret

Last active Apr 13, 2019
Embed
What would you like to do?
<html>
<script src="//app.resolvepay.com/js/resolve.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
$().ready(function() {
$('#btn-order').click(function() {
resolve.checkout({
merchant: {
id: 'MERCHANT_ID',
success_url: 'MERCHANT_WEBSITE/confirm',
cancel_url: 'MERCHANT_WEBSITE/cancel'
},
customer: {
first_name: 'First',
last_name: 'Last',
phone: '',
email: 'first_last@gmail.com',
},
shipping: {
name: 'First Last',
company_name: 'Company Name', // optional
phone: '4153334567',
address_line1: '633 Folsom St',
address_line2: 'FL 7', // optional
address_city: 'San Francisco',
address_postal: '94017',
address_country: 'US',
},
billing: {
first_name: 'First',
last_name: 'Last',
phone: '4153334567',
},
items: [{
name: 'Product Name',
sku: 'ABC-123',
unit_price: 19.99,
quantity: 3,
}],
order_number: '', // (optional) merchant order number
po_number: '', // (optional) buyer purchase order number if required
shipping_amount: 0.00,
tax_amount: 5.00,
total_amount: 64.97,
});
});
});
</script>
<body>
<button id="btn-order">Place Order</button>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment