Closed gustavomanolo closed 5 years ago
Hi @gustavomanolo, The problem is the method openpay.customers.charges.create(...) requires three parameters customerId, cardChargeRequest, callback if you do not have a customer id you can use the method openpay.charges.create(...)
Regards
Hi, i'm trying to create a charge with the following code:
`openpay.customers.charges.create( { source_id: paymentDetails['card_id'], method: 'card', amount: totalFinal, description: description, device_session_id: paymentDetails['device_session_id'], customer: { name: 'John', last_name: 'Doe', email: 'test@gmail.com' } }, function(error, charge) { if (error) { // There was an error with the charge console.error('Error processing card payment', error)
But i'm getting the following error: TypeError: data.callback is not a function at Request._callback (/Users/gustavomanolo/Documents/webapps/uchiti/node_modules/openpay/lib/openpay.js:797:10)