Class: MangoModel::PreAuthorization

Inherits:
EntityBase show all
Includes:
MangoPay::Jsonifier
Defined in:
lib/mangopay/model/entity/pre_authorization.rb

Overview

Pre-Authorization entity The Pre-Authorization object ensures the solvency of a registered card for 7 days.

The overall process is as follows: Register a card (CardRegistration) Create a PreAuthorization with the CardId. This allows you to charge an amount on a card Charge the card through the PreAuthorized PayIn object (Payins/preauthorized/direct)

How does PreAuthorization work? Once the PreAuthorization object is created the Status is “CREATED” until 3D secure validation. If the authorization is successful the status is “SUCCEEDED” if it failed the status is “FAILED”. Once Status = “SUCCEEDED” and PaymentStatus = “WAITING” you can charge the card. The Pay-In amount has to be less than or equal to the amount authorized.

Constant Summary

Constants included from MangoPay::Jsonifier

MangoPay::Jsonifier::LOG

Instance Attribute Summary collapse

Attributes inherited from EntityBase

#creation_date, #id, #tag

Method Summary

Methods included from MangoPay::Jsonifier

#dejsonify, #jsonify!

Methods included from NonInstantiable

#initialize

Instance Attribute Details

#applied_3ds_versionObject

String

Applied3DSVersion



93
94
95
# File 'lib/mangopay/model/entity/pre_authorization.rb', line 93

def applied_3ds_version
  @applied_3ds_version
end

#author_idObject

String

Its authoring user’s ID



23
24
25
# File 'lib/mangopay/model/entity/pre_authorization.rb', line 23

def author_id
  @author_id
end

#billingObject

Billing

Billing information



69
70
71
# File 'lib/mangopay/model/entity/pre_authorization.rb', line 69

def billing
  @billing
end

#browser_infoObject

BrowserInfo

Browser Info



87
88
89
# File 'lib/mangopay/model/entity/pre_authorization.rb', line 87

def browser_info
  @browser_info
end

#card_idObject

String

ID of the pre-authorized card



49
50
51
# File 'lib/mangopay/model/entity/pre_authorization.rb', line 49

def card_id
  @card_id
end

#debited_fundsObject

Money

Information about the funds being debited



26
27
28
# File 'lib/mangopay/model/entity/pre_authorization.rb', line 26

def debited_funds
  @debited_funds
end

#execution_typeObject

PreAuthorizationExecutionType

How the pre-authorization was executed



42
43
44
# File 'lib/mangopay/model/entity/pre_authorization.rb', line 42

def execution_type
  @execution_type
end

#expiration_dateObject

Integer

Date by when the payment should be processed (UNIX timestamp)



63
64
65
# File 'lib/mangopay/model/entity/pre_authorization.rb', line 63

def expiration_date
  @expiration_date
end

#ip_addressObject

String

IpAddress



81
82
83
# File 'lib/mangopay/model/entity/pre_authorization.rb', line 81

def ip_address
  @ip_address
end

#multi_captureObject

true/false

True if the Multi Capture was used



75
76
77
# File 'lib/mangopay/model/entity/pre_authorization.rb', line 75

def multi_capture
  @multi_capture
end

#pay_in_idObject

String

ID of the associated Pay-in



66
67
68
# File 'lib/mangopay/model/entity/pre_authorization.rb', line 66

def pay_in_id
  @pay_in_id
end

#payment_statusObject

PaymentStatus

Its pre-authorized payment status

Can be set to CANCELED if needed



33
34
35
# File 'lib/mangopay/model/entity/pre_authorization.rb', line 33

def payment_status
  @payment_status
end

#remaining_fundsObject

Money

Information about the remaining funds



78
79
80
# File 'lib/mangopay/model/entity/pre_authorization.rb', line 78

def remaining_funds
  @remaining_funds
end

#requested_3ds_versionObject

String

Requested3DSVersion



90
91
92
# File 'lib/mangopay/model/entity/pre_authorization.rb', line 90

def requested_3ds_version
  @requested_3ds_version
end

#result_codeObject

String

Its result code



36
37
38
# File 'lib/mangopay/model/entity/pre_authorization.rb', line 36

def result_code
  @result_code
end

#result_messageObject

String

Explanation of its result



39
40
41
# File 'lib/mangopay/model/entity/pre_authorization.rb', line 39

def result_message
  @result_message
end

#secure_modeObject

SecureMode

The Secure Mode Corresponds to ‘3D secure’ for CB Visa and

Mastercard. This field allows manual activation.



46
47
48
# File 'lib/mangopay/model/entity/pre_authorization.rb', line 46

def secure_mode
  @secure_mode
end

#secure_mode_neededObject

true/false

True if the Secure Mode was used



52
53
54
# File 'lib/mangopay/model/entity/pre_authorization.rb', line 52

def secure_mode_needed
  @secure_mode_needed
end

#secure_mode_redirect_urlObject

String

URL which to redirect users to in order to proceed

to 3D secure validation



56
57
58
# File 'lib/mangopay/model/entity/pre_authorization.rb', line 56

def secure_mode_redirect_url
  @secure_mode_redirect_url
end

#secure_mode_return_urlObject

String

URL which users are automatically redirected to

after 3D secure validation



60
61
62
# File 'lib/mangopay/model/entity/pre_authorization.rb', line 60

def secure_mode_return_url
  @secure_mode_return_url
end

#security_infoObject

SecurityInfo

Security & validation information



72
73
74
# File 'lib/mangopay/model/entity/pre_authorization.rb', line 72

def security_info
  @security_info
end

#shippingObject

Shipping

Shipping information



84
85
86
# File 'lib/mangopay/model/entity/pre_authorization.rb', line 84

def shipping
  @shipping
end

#statusObject

PreAuthorizationStatus

Its status



29
30
31
# File 'lib/mangopay/model/entity/pre_authorization.rb', line 29

def status
  @status
end