def testcomplete(self): checkouts.complete('123456', dwollaparse='dwolla') checkouts.r._get_without_token.assert_any_call( '/offsitegateway/checkouts/123456/complete', { 'client_secret': 'SOME ID', 'client_id': 'SOME ID' }, {'dwollaparse': 'dwolla'})
# Step 1: Create checkout session with items from # http://docs.dwolla.com/#checkouts test = checkouts.create({ 'orderItems': { frozenset({ 'name': 'Prime Rib Sandwich', 'description': 'A somewhat tasty non-vegetarian sandwich', 'quantity': '1', 'price': '15.00' }) }, 'destinationId': '812-740-4294', 'total': 15.00, 'notes': 'blahhh', 'metadata': frozenset({ 'key1': 'something', 'key2': 'another thing' })}) # Step 2: Verify the recently created checkout checkouts.get(test['CheckoutId']) # Step 3: Complete the checkout checkouts.complete('Order ID here') # Step 4: Verify gateway signature checkouts.verify('YOUR SIGNATURE HERE', 'YOUR CHECKOUT ID HERE', 4.50)
def testcomplete(self): checkouts.complete('123456', dwollaparse='dwolla') checkouts.r._get_without_token.assert_any_call('/offsitegateway/checkouts/123456/complete', {'client_secret': 'SOME ID', 'client_id': 'SOME ID'}, {'dwollaparse':'dwolla'})
def testcomplete(self): checkouts.complete('123456') checkouts.r._get.assert_any_call('/offsitegateway/checkouts/123456/complete', {'client_secret': 'SOME ID', 'client_id': 'SOME ID'})