Skip to content
glorieux edited this page Aug 2, 2013 · 2 revisions

The PayInWebCard Object

Property Type More
Id Integer
Tag String
CreationDate Time
AuthorId Integer
CreditedFunds Integer
DebitedFunds Money Hash { Currency: 'EUR', Amount: 10 }
CreditedFunds Money Hash { Currency: 'EUR', Amount: 10 }
Fees Money Hash { Currency: 'EUR', Amount: 10 }
Status String either CREATED, SUCCEEDED or FAILED
ResultCode Integer
ExecutionDate Date
Type String either PAY_IN, PAY_OUT or TRANSFER
Nature String either NORMAL, REFUND or REPUDIATION
CreditedWalletId Integer
PaymentType String either CARD, BANK_WIRE, AUTOMATIC_DEBIT or DIRECT_DEBIT
ExecutionType String either WEB, TOKEN, DIRECT, PREAUTHORIZED or RECURRING_ORDER_EXECUTION
CardType String either CB_VISA_MASTERCARD or AMEX
RedirectURL String URL Format expected
ReturnURL String URL Format expected
TemplateURL String URL Format expected
ShowRegisteredCard Boolean
RegisterCard Boolean
Culture String
Mode3DS String either DEFAULT or FORCE

Creating a new PayInWebCard

Arguments

  • payin_web_card: A hash:
    • AuthorId
    • CreditedUserId
    • DebitedFunds
    • Fees
    • CreditedWalletId
    • ReturnURL
    • CardType
    • Culture
    • Tag

Returns

A PayInWebCard Object

Example

MangoPay::PayIn::Card::Web.create({
  AuthorId: 54324,
  CreditedUserId: 43243,
  DebitedFunds: { Currency: 'EUR', Amount: 1000 },
  Fees: { Currency: 'EUR', Amount: 0 },
  CreditedWalletId: 543455,
  ReturnURL: 'https://your.company.com',
  CardType: 'CB_VISA_MASTERCARD',
  Culture: 'FR',
  Tag: 'Test Card'
})

Retrieving a PayInWebCard

Arguments

  • payin_web_card_id: the id of the PayInWebCard you want to fetch

Returns

A PayInWebCard Object

Example

MangoPay::PayIn.fetch(430293)

Refunding a PayIn

Arguments

  • payin_id: the id of the payin you want to refund
  • refund: A hash:
    • Tag
    • AuthorId
    • DebitedFunds
    • Fees

Returns

A Refund Object

Example

MangoPay::PayIn.refund(430293, {
  AuthorId: 313212
})