Project

kgestpay

0.0
No commit activity in last 3 years
No release in over 3 years
server to server implementation for gestpay gateway
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0
 Project Readme

License

This gem is developed by fractalgarden (fractalgarden.com) and released under BSD license. See license file for more details.

Installation

gem install kgestpay

Running tests

Create a file /test/cc.yml with the details of the credit card to be used to run the tests:

number: cc_number
exp_month: 09
exp_year: 13
cvv: 111
name: 'Andrea Campolonghi'
email: email@email.com

callPagamS2S

Service that authorize only or complete the transaction based on the gestpay account configs provided (MOTO)

#gateway init
gateway = Kemen::KGestPay.new(:shopLogin => 'login', :endpoint => 'url del ws - test o produzione')
#call the service with the required parameters
resp = gateway.callPagamS2S(
    :uicCode => {currency code},
    :amount => ..,
    :shopTransactionId => {transaction id assigned by the seller},
    :cardNumber => ......,
    :expiryMonth => 09,
    :expiryYear => {last 2 digits of the expiring year},
    :cvv => ...,
    :buyerName => .....,
    :buyerEmail => ....)
#check the transaction result
resp.transactionResult => KO or OK
resp.authorizationCode => auth code
resp.bankTransactionID => transaction is assigned by the bank
resp.errorCode => in case of KO holds the error code assigned by gestpay
resp.errorDescription => in case of KO holds the description of the error
resp.buyer.buyerName => nome del cliente
resp.buyer.buyerEmail => email del cliente

callSettleS2S

Cash an already authorized card/amount. Used only for transaction only authorized but not yet cashed.

#gateway init
gateway = Kemen::KGestPay.new(:shopLogin => 'login', :endpoint => 'url del ws - test o produzione')
#call the service
resp = @k.callSettleS2S(
    :bankTransID => {transactionid assigned by the bank in the authorization process},
    OR
    :shopTransID => {transactionid assigned by the seller in the authorization process},
    :uicCode => {currency code},
    :amount => ...
)
#check the transaction result
resp.transactionResult => KO or OK

callDeleteS2S

Delete an authorized transaction. Available only for transaction only authorized but not yet finalized.

#gateway init
gateway = Kemen::KGestPay.new(:shopLogin => 'login', :endpoint => 'url del ws - test o produzione')
#call the service
resp = @k.callDeleteS2S(
    :shopTransactionId => {transactionid assigned by the seller in the authorization process}
    OR
    :bankTransactionId => {transactionid assigned by the bank in the authorization process}
)
#check the transaction result
resp.transactionResult => KO or OK

callRefundS2S

Refund a completed transaction. Refund can be for a partial amount. Both shopTransactionId and bankTransactionId must be provided for a bug that return a system error
if one is missing.

#gateway init
gateway = Kemen::KGestPay.new(:shopLogin => 'login', :endpoint => 'url del ws - test o produzione')
#call the service
resp = @k.callRefundS2S(
    :shopTransactionId => {transactionid assigned by the seller in the authorization process},
    :bankTransactionId => {transactionid assigned by the bank in the authorization process},
    :uicCode => 242,
    :amount => ...
)
#check the transaction result
resp.transactionResult => KO or OK

callReadTrxS2S

Read informations about a transaction.

#gateway init
gateway = Kemen::KGestPay.new(:shopLogin => 'login', :endpoint => 'url del ws - test o produzione')
#call the service
resp = @k.callRefundS2S(
    :shopTransactionId => {transactionid assigned by the seller in the authorization process},
    :bankTransactionId => {transactionid assigned by the bank in the authorization process}
)
#check the transaction result
resp.transactionResult => KO = Authorized or OK = Not Authorized
+ the same infos that are normally returned from callPagamS2S

callVerifycardS2S

Not implemented cause service is not available.