Class: MangoModel::PreAuthorization
- Inherits:
-
EntityBase
- Object
- EntityBase
- MangoModel::PreAuthorization
- 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
Instance Attribute Summary collapse
-
#applied_3ds_version ⇒ Object
- String
-
Applied3DSVersion.
-
#author_id ⇒ Object
- String
-
Its authoring user’s ID.
-
#billing ⇒ Object
- Billing
-
Billing information.
-
#browser_info ⇒ Object
- BrowserInfo
-
Browser Info.
-
#card_id ⇒ Object
- String
-
ID of the pre-authorized card.
-
#debited_funds ⇒ Object
- Money
-
Information about the funds being debited.
-
#execution_type ⇒ Object
- PreAuthorizationExecutionType
-
How the pre-authorization was executed.
-
#expiration_date ⇒ Object
- Integer
-
Date by when the payment should be processed (UNIX timestamp).
-
#ip_address ⇒ Object
- String
-
IpAddress.
-
#multi_capture ⇒ Object
- true/false
-
True if the Multi Capture was used.
-
#pay_in_id ⇒ Object
- String
-
ID of the associated Pay-in.
-
#payment_status ⇒ Object
- PaymentStatus
-
Its pre-authorized payment status Can be set to
CANCELED
if needed.
-
#remaining_funds ⇒ Object
- Money
-
Information about the remaining funds.
-
#requested_3ds_version ⇒ Object
- String
-
Requested3DSVersion.
-
#result_code ⇒ Object
- String
-
Its result code.
-
#result_message ⇒ Object
- String
-
Explanation of its result.
-
#secure_mode ⇒ Object
- SecureMode
-
The Secure Mode Corresponds to ‘3D secure’ for CB Visa and Mastercard.
-
#secure_mode_needed ⇒ Object
- true/false
-
True if the Secure Mode was used.
-
#secure_mode_redirect_url ⇒ Object
- String
-
URL which to redirect users to in order to proceed to 3D secure validation.
-
#secure_mode_return_url ⇒ Object
- String
-
URL which users are automatically redirected to after 3D secure validation.
-
#security_info ⇒ Object
- SecurityInfo
-
Security & validation information.
-
#shipping ⇒ Object
- Shipping
-
Shipping information.
-
#status ⇒ Object
- PreAuthorizationStatus
-
Its status.
Attributes inherited from EntityBase
Method Summary
Methods included from MangoPay::Jsonifier
Methods included from NonInstantiable
Instance Attribute Details
#applied_3ds_version ⇒ Object
- String
-
Applied3DSVersion
93 94 95 |
# File 'lib/mangopay/model/entity/pre_authorization.rb', line 93 def applied_3ds_version @applied_3ds_version end |
#author_id ⇒ Object
- String
-
Its authoring user’s ID
23 24 25 |
# File 'lib/mangopay/model/entity/pre_authorization.rb', line 23 def @author_id end |
#billing ⇒ Object
- Billing
-
Billing information
69 70 71 |
# File 'lib/mangopay/model/entity/pre_authorization.rb', line 69 def billing @billing end |
#browser_info ⇒ Object
- BrowserInfo
-
Browser Info
87 88 89 |
# File 'lib/mangopay/model/entity/pre_authorization.rb', line 87 def browser_info @browser_info end |
#card_id ⇒ Object
- 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_funds ⇒ Object
- 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_type ⇒ Object
- 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_date ⇒ Object
- 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_address ⇒ Object
- String
-
IpAddress
81 82 83 |
# File 'lib/mangopay/model/entity/pre_authorization.rb', line 81 def ip_address @ip_address end |
#multi_capture ⇒ Object
- 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_id ⇒ Object
- 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_status ⇒ Object
- 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_funds ⇒ Object
- 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_version ⇒ Object
- String
-
Requested3DSVersion
90 91 92 |
# File 'lib/mangopay/model/entity/pre_authorization.rb', line 90 def requested_3ds_version @requested_3ds_version end |
#result_code ⇒ Object
- String
-
Its result code
36 37 38 |
# File 'lib/mangopay/model/entity/pre_authorization.rb', line 36 def result_code @result_code end |
#result_message ⇒ Object
- String
-
Explanation of its result
39 40 41 |
# File 'lib/mangopay/model/entity/pre_authorization.rb', line 39 def @result_message end |
#secure_mode ⇒ Object
- 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_needed ⇒ Object
- 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_url ⇒ Object
- 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_url ⇒ Object
- 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_info ⇒ Object
- SecurityInfo
-
Security & validation information
72 73 74 |
# File 'lib/mangopay/model/entity/pre_authorization.rb', line 72 def security_info @security_info end |
#shipping ⇒ Object
- Shipping
-
Shipping information
84 85 86 |
# File 'lib/mangopay/model/entity/pre_authorization.rb', line 84 def shipping @shipping end |
#status ⇒ Object
- PreAuthorizationStatus
-
Its status
29 30 31 |
# File 'lib/mangopay/model/entity/pre_authorization.rb', line 29 def status @status end |