Mangopay / mangopay2-ruby-sdk

Ruby Gem for MANGOPAY
https://rubygems.org/gems/mangopay
MIT License
42 stars 38 forks source link

How to do a simple card payment? #127

Closed F4Ke closed 6 years ago

F4Ke commented 6 years ago

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