Mangopay/mangopay2-ruby-sdk

How to do a simple card payment?

Closed this issue · 0 comments

F4Ke commented

I've just started to implement MangoPay for my application;

The Authentication part is OK, and when a user register, I am creating NaturalUser on the platform;

So now, I want to allow users to make a payment with their credit card;

I have found in the doc, the PayIn object :

pay = MangoPay::PayIn::Card::Web.create({
  AuthorId: user_buyer_id,
  CreditedUserId: user_id,
  DebitedFunds: { Currency: 'EUR', Amount: 1000 },
  Fees: { Currency: 'EUR', Amount: 0 },
  CreditedWalletId: ??????,
  ReturnURL: 'https://your.company.com',
  CardType: 'CB_VISA_MASTERCARD',
  Culture: '...',
  Tag: '...'
})

But here I can see CreditedWalletId ... Do I have to create a wallet ?

But in the object wallet there is no card to register...

I am kinda lost,

How can I do a One time payment with Mangopay ?

thanks