omise / omise-node

Omise Node.js Library
https://docs.opn.ooo
102 stars 53 forks source link

Charge with card #155

Closed Harrrrry closed 1 year ago

Harrrrry commented 3 years ago

I am unable to charge the added card for the customer. My scenario : 1) I create a customer and then add the card to the customer. 2) get the card list. 3) Do the payment after selecting one card from the list.

1 and 2 points are working but I am unable to do the payment with a card. Can you please provide me the code for that? I have a card id, customer id what parameter I sent to the charge API?

Thanks,

danfowler commented 1 year ago

Closing due to lack of activity. If you are still unable to get this working, can you provide the error message you are running into when trying to do a payment with a card.

Please refer to the example code here https://github.com/omise/omise-node/blob/925d0a99671a147e3c756b02b4ab0ea45134422e/examples/as_promises.js#L31

Screenshot 2023-03-16 at 9 32 50 AM

Note, if you want to charge a specific card on a customer, you will need to pass both customer and card.