module GpWebpay
Service
object signs request which can be send to GP Webpay payment gateway.
-
Use request value object to translate attributes to correct GP Webpay format and order.
-
Append generated digest to attributes.
-
prepare url to send for GP Webpay
@param [Hash] optional attributes for GP Webpay
@return [Hash] data needed to make request:
full url for GET request or url_root and list of attributes for POST request.
Service
object creates request data for GP Webpay CREATE_ORDER operation.
Examples:
> Create order which will remember credit card and send back TOKEN.¶ ↑
> GpWebpay::Http::CreateOrder.call(order_number: 146, amount: 456, currency: 978, deposit_flag: 1, user_param1: 'T')
> Use returned token to skip adding card again:¶ ↑
> GpWebpay::Http::CreateOrder.call(order_number: 147, amount: 456, currency: 978, deposit_flag: 1, user_param1: 'S', token: 'TOKEN')
Service
object creates request data for GP Webpay CARD_VERIFICATION operation.
Service
object validates result received from GP Webpay response redirect.
-
Use public cert of GP Webpay to verify it comes from GP Webpay.
-
Whitelist allowed attributes which are expected from GP Webpay.
-
Calculate digest and make sure it corresponds to received DIGEST.
-
Calculate digest1 and make sure it corresponds to received DIGEST1 (which includes our merchant number for extra security).
@param [Hash] Parameters hash received in response from GP Webpay.
@return [Boolean] true if signature is valid for both digests.
rubocop:disable Metrics/ParameterLists
Service
object signs request which can be send to GP Webpay payment gateway.
-
Use request value object to translate attributes to correct GP Webpay format and order.
-
Append generated signature to attributes. We expect that XML types are prefixed with 'ins0:' by default.
-
send XML WS SOAP API request.
-
generate response object:
-
success containing response.
-
http error when client-side request fails.
-
fail error when external server returns fault.
-
@param [Hash] attributes for GP Webpay
@return [GpWebpay::Ws::WsResponse] response value object
Service
object checks if GP Webpay WS service is available.
-
Send request :echo operation to SOUP API.
-
Receive answer, return true if response is present in desired format.
-
Return false if
-
response is not in valid format.
-
request fails client-side.
-
request returns failure from server.
-
@return [Boolean] GP Webpay is available
Service
object returns current status of credit card token. Should be used to keep credit card status up-to date, should be called before process_token_payment to ensure card is still VERIFIED.
@param [Hash] attributes for GP Webpay
@return [GpWebpay::Ws::WsResponse] response value object
Service
object returns current status of payment.
@param [Hash] attributes for GP Webpay
@return [GpWebpay::Ws::WsResponse] response value object
Service
object returns current status of credit card token. Should be used to keep credit card status up-to date, should be called before process_token_payment to ensure card is still VERIFIED.
@param [Hash] attributes for GP Webpay
@return [GpWebpay::Ws::WsResponse] response value object
Service
object creates fast payment without need of leaving user from Wilio web / app. It uses VERIFIED credit card token to skip filling card again and 3D secure step.
@param [Hash] attributes for GP Webpay
@return [GpWebpay::Ws::WsResponse] response value object
Service
object creates fast payment without need of leaving user from Wilio web / app. It uses VERIFIED credit card token to skip filling card again and 3D secure step.
@param [Hash] attributes for GP Webpay
@return [GpWebpay::Ws::WsResponse] response value object
Service
object creates fast payment without need of leaving user from Wilio web / app. It uses VERIFIED credit card token to skip filling card again and 3D secure step.
@param [Hash] attributes for GP Webpay
@return [GpWebpay::Ws::WsResponse] response value object
Service
object changes credit card token status to “REVOKED”. Should be used when user decides to remove card from system.
@param [Hash] attributes for GP Webpay
@return [GpWebpay::Ws::WsResponse] response value object
Service
object creates fast payment without need of leaving user from Wilio web / app. It uses VERIFIED credit card token to skip filling card again and 3D secure step.
@param [Hash] attributes for GP Webpay
@return [GpWebpay::Ws::WsResponse] response value object
Service
object creates fast payment without need of leaving user from Wilio web / app. It uses VERIFIED credit card token to skip filling card again and 3D secure step.
@param [Hash] attributes for GP Webpay
@return [GpWebpay::Ws::WsResponse] response value object
Service
object creates fast payment without need of leaving user from Wilio web / app. It uses VERIFIED credit card token to skip filling card again and 3D secure step.
@param [Hash] attributes for GP Webpay
@return [GpWebpay::Ws::WsResponse] response value object
Service
object changes credit card token status to “REVOKED”. Should be used when user decides to remove card from system.
@param [Hash] attributes for GP Webpay
@return [GpWebpay::Ws::WsResponse] response value object
Service
object creates fast payment without need of leaving user from Wilio web / app. It uses VERIFIED credit card token to skip filling card again and 3D secure step.
@param [Hash] attributes for GP Webpay
@return [GpWebpay::Ws::WsResponse] response value object
Service
object validates result received from GP Webpay response by WS in XML format.
-
Use public cert of GP Webpay to verify it comes from GP Webpay.
-
Whitelist allowed attributes which are expected from GP Webpay.
-
Calculate signature and make sure it corresponds to received signature.
@param [Hash] Parameters hash received in XML response from GP Webpay.
@return [Boolean] true if signature is valid for both digests.
Constants
- VERSION
Public Class Methods
# File lib/rails-gp-webpay.rb, line 44 def self.config @configuration end
# File lib/rails-gp-webpay.rb, line 48 def self.configure yield(@configuration) end
# File lib/rails-gp-webpay.rb, line 52 def self.root File.dirname(__dir__) end