okpay 0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/config/wsdl.xml +1 -0
- data/lib/okpay.rb +61 -0
- metadata +57 -0
data/config/wsdl.xml
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?><wsdl:definitions name="OkPayAPIImplementation" targetNamespace="https://api.okpay.com" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:i0="http://tempuri.org/" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="https://api.okpay.com" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"><wsp:Policy wsu:Id="BasicHttpBinding_I_OkPayAPI_policy"><wsp:ExactlyOne><wsp:All><sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"><wsp:Policy><sp:TransportToken><wsp:Policy><sp:HttpsToken RequireClientCertificate="false"/></wsp:Policy></sp:TransportToken><sp:AlgorithmSuite><wsp:Policy><sp:Basic256/></wsp:Policy></sp:AlgorithmSuite><sp:Layout><wsp:Policy><sp:Strict/></wsp:Policy></sp:Layout></wsp:Policy></sp:TransportBinding></wsp:All></wsp:ExactlyOne></wsp:Policy><wsdl:types><xs:schema elementFormDefault="qualified" targetNamespace="https://api.okpay.com" xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:import namespace="http://schemas.datacontract.org/2004/07/OkPayAPI"/><xs:import namespace="http://schemas.datacontract.org/2004/07/OkPayLink.OkPayService"/><xs:element name="Get_Date_Time"><xs:complexType><xs:sequence/></xs:complexType></xs:element><xs:element name="Get_Date_TimeResponse"><xs:complexType><xs:sequence><xs:element minOccurs="0" name="Get_Date_TimeResult" nillable="true" type="xs:string"/></xs:sequence></xs:complexType></xs:element><xs:element name="Wallet_Get_Balance"><xs:complexType><xs:sequence><xs:element minOccurs="0" name="WalletID" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="SecurityToken" nillable="true" type="xs:string"/></xs:sequence></xs:complexType></xs:element><xs:element name="Wallet_Get_BalanceResponse"><xs:complexType><xs:sequence><xs:element minOccurs="0" name="Wallet_Get_BalanceResult" nillable="true" type="q1:ArrayOfBalance" xmlns:q1="http://schemas.datacontract.org/2004/07/OkPayAPI"/></xs:sequence></xs:complexType></xs:element><xs:element name="Wallet_Get_Currency_Balance"><xs:complexType><xs:sequence><xs:element minOccurs="0" name="WalletID" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="SecurityToken" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="Currency" nillable="true" type="xs:string"/></xs:sequence></xs:complexType></xs:element><xs:element name="Wallet_Get_Currency_BalanceResponse"><xs:complexType><xs:sequence><xs:element minOccurs="0" name="Wallet_Get_Currency_BalanceResult" nillable="true" type="q2:Balance" xmlns:q2="http://schemas.datacontract.org/2004/07/OkPayAPI"/></xs:sequence></xs:complexType></xs:element><xs:element name="Send_Money"><xs:complexType><xs:sequence><xs:element minOccurs="0" name="WalletID" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="SecurityToken" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="Receiver" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="Currency" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="Amount" type="xs:decimal"/><xs:element minOccurs="0" name="Comment" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="IsReceiverPaysFees" type="xs:boolean"/><xs:element minOccurs="0" name="Invoice" nillable="true" type="xs:string"/></xs:sequence></xs:complexType></xs:element><xs:element name="Send_MoneyResponse"><xs:complexType><xs:sequence><xs:element minOccurs="0" name="Send_MoneyResult" nillable="true" type="q3:TransactionInfo" xmlns:q3="http://schemas.datacontract.org/2004/07/OkPayAPI"/></xs:sequence></xs:complexType></xs:element><xs:element name="Transaction_Get"><xs:complexType><xs:sequence><xs:element minOccurs="0" name="WalletID" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="SecurityToken" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="TxnID" type="xs:long"/><xs:element minOccurs="0" name="Invoice" nillable="true" type="xs:string"/></xs:sequence></xs:complexType></xs:element><xs:element name="Transaction_GetResponse"><xs:complexType><xs:sequence><xs:element minOccurs="0" name="Transaction_GetResult" nillable="true" type="q4:TransactionInfo" xmlns:q4="http://schemas.datacontract.org/2004/07/OkPayAPI"/></xs:sequence></xs:complexType></xs:element><xs:element name="Transaction_History"><xs:complexType><xs:sequence><xs:element minOccurs="0" name="WalletID" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="SecurityToken" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="From" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="Till" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="PageSize" type="xs:int"/><xs:element minOccurs="0" name="PageNumber" type="xs:int"/></xs:sequence></xs:complexType></xs:element><xs:element name="Transaction_HistoryResponse"><xs:complexType><xs:sequence><xs:element minOccurs="0" name="Transaction_HistoryResult" nillable="true" type="q5:HistoryInfo" xmlns:q5="http://schemas.datacontract.org/2004/07/OkPayAPI"/></xs:sequence></xs:complexType></xs:element><xs:element name="DebitCard_Prepay"><xs:complexType><xs:sequence><xs:element minOccurs="0" name="WalletID" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="SecurityToken" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="Email" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="Currency" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="IsCourierDelivery" type="xs:boolean"/><xs:element minOccurs="0" name="Comment" nillable="true" type="xs:string"/></xs:sequence></xs:complexType></xs:element><xs:element name="DebitCard_PrepayResponse"><xs:complexType><xs:sequence><xs:element minOccurs="0" name="DebitCard_PrepayResult" type="xs:long"/></xs:sequence></xs:complexType></xs:element><xs:element name="Account_Check"><xs:complexType><xs:sequence><xs:element minOccurs="0" name="WalletID" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="SecurityToken" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="Account" nillable="true" type="xs:string"/></xs:sequence></xs:complexType></xs:element><xs:element name="Account_CheckResponse"><xs:complexType><xs:sequence><xs:element minOccurs="0" name="Account_CheckResult" type="xs:long"/></xs:sequence></xs:complexType></xs:element><xs:element name="Withdraw_To_Ecurrency_Calculate"><xs:complexType><xs:sequence><xs:element minOccurs="0" name="WalletID" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="SecurityToken" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="PaymentMethod" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="Amount" type="xs:decimal"/><xs:element minOccurs="0" name="Currency" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="FeesFromAmount" type="xs:boolean"/></xs:sequence></xs:complexType></xs:element><xs:element name="Withdraw_To_Ecurrency_CalculateResponse"><xs:complexType><xs:sequence><xs:element minOccurs="0" name="Withdraw_To_Ecurrency_CalculateResult" nillable="true" type="q6:Withdrawal_Info" xmlns:q6="http://schemas.datacontract.org/2004/07/OkPayAPI"/></xs:sequence></xs:complexType></xs:element><xs:element name="Withdraw_To_Ecurrency"><xs:complexType><xs:sequence><xs:element minOccurs="0" name="WalletID" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="SecurityToken" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="PaymentMethod" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="PaySystemAccount" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="Amount" type="xs:decimal"/><xs:element minOccurs="0" name="Currency" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="FeesFromAmount" type="xs:boolean"/><xs:element minOccurs="0" name="Invoice" nillable="true" type="xs:string"/></xs:sequence></xs:complexType></xs:element><xs:element name="Withdraw_To_EcurrencyResponse"><xs:complexType><xs:sequence><xs:element minOccurs="0" name="Withdraw_To_EcurrencyResult" nillable="true" type="q7:Withdrawal_Info" xmlns:q7="http://schemas.datacontract.org/2004/07/OkPayAPI"/></xs:sequence></xs:complexType></xs:element><xs:element name="EX_Account_Check"><xs:complexType><xs:sequence><xs:element minOccurs="0" name="WalletID" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="SecurityToken" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="Account" nillable="true" type="xs:string"/></xs:sequence></xs:complexType></xs:element><xs:element name="EX_Account_CheckResponse"><xs:complexType><xs:sequence><xs:element minOccurs="0" name="EX_Account_CheckResult" type="xs:long"/></xs:sequence></xs:complexType></xs:element><xs:element name="EX_Client_Check_Status"><xs:complexType><xs:sequence><xs:element minOccurs="0" name="WalletID" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="SecurityToken" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="Email" nillable="true" type="xs:string"/></xs:sequence></xs:complexType></xs:element><xs:element name="EX_Client_Check_StatusResponse"><xs:complexType><xs:sequence><xs:element minOccurs="0" name="EX_Client_Check_StatusResult" type="q8:ClientStatus" xmlns:q8="http://schemas.datacontract.org/2004/07/OkPayLink.OkPayService"/></xs:sequence></xs:complexType></xs:element></xs:schema><xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/"><xs:element name="anyType" nillable="true" type="xs:anyType"/><xs:element name="anyURI" nillable="true" type="xs:anyURI"/><xs:element name="base64Binary" nillable="true" type="xs:base64Binary"/><xs:element name="boolean" nillable="true" type="xs:boolean"/><xs:element name="byte" nillable="true" type="xs:byte"/><xs:element name="dateTime" nillable="true" type="xs:dateTime"/><xs:element name="decimal" nillable="true" type="xs:decimal"/><xs:element name="double" nillable="true" type="xs:double"/><xs:element name="float" nillable="true" type="xs:float"/><xs:element name="int" nillable="true" type="xs:int"/><xs:element name="long" nillable="true" type="xs:long"/><xs:element name="QName" nillable="true" type="xs:QName"/><xs:element name="short" nillable="true" type="xs:short"/><xs:element name="string" nillable="true" type="xs:string"/><xs:element name="unsignedByte" nillable="true" type="xs:unsignedByte"/><xs:element name="unsignedInt" nillable="true" type="xs:unsignedInt"/><xs:element name="unsignedLong" nillable="true" type="xs:unsignedLong"/><xs:element name="unsignedShort" nillable="true" type="xs:unsignedShort"/><xs:element name="char" nillable="true" type="tns:char"/><xs:simpleType name="char"><xs:restriction base="xs:int"/></xs:simpleType><xs:element name="duration" nillable="true" type="tns:duration"/><xs:simpleType name="duration"><xs:restriction base="xs:duration"><xs:pattern value="\-?P(\d*D)?(T(\d*H)?(\d*M)?(\d*(\.\d*)?S)?)?"/><xs:minInclusive value="-P10675199DT2H48M5.4775808S"/><xs:maxInclusive value="P10675199DT2H48M5.4775807S"/></xs:restriction></xs:simpleType><xs:element name="guid" nillable="true" type="tns:guid"/><xs:simpleType name="guid"><xs:restriction base="xs:string"><xs:pattern value="[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}"/></xs:restriction></xs:simpleType><xs:attribute name="FactoryType" type="xs:QName"/><xs:attribute name="Id" type="xs:ID"/><xs:attribute name="Ref" type="xs:IDREF"/></xs:schema><xs:schema elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/OkPayAPI" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://schemas.datacontract.org/2004/07/OkPayAPI"><xs:import namespace="http://schemas.datacontract.org/2004/07/OkPayLink.OkPayService"/><xs:import namespace="http://schemas.microsoft.com/2003/10/Serialization/"/><xs:complexType name="ArrayOfBalance"><xs:sequence><xs:element minOccurs="0" maxOccurs="unbounded" name="Balance" nillable="true" type="tns:Balance"/></xs:sequence></xs:complexType><xs:element name="ArrayOfBalance" nillable="true" type="tns:ArrayOfBalance"/><xs:complexType name="Balance"><xs:sequence><xs:element minOccurs="0" name="Amount" type="xs:decimal"/><xs:element minOccurs="0" name="Currency" nillable="true" type="xs:string"/></xs:sequence></xs:complexType><xs:element name="Balance" nillable="true" type="tns:Balance"/><xs:complexType name="TransactionInfo"><xs:sequence><xs:element minOccurs="0" name="Amount" type="xs:decimal"/><xs:element minOccurs="0" name="Comment" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="Currency" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="Date" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="Fees" type="xs:decimal"/><xs:element minOccurs="0" name="ID" type="xs:long"/><xs:element minOccurs="0" name="Invoice" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="Net" type="xs:decimal"/><xs:element minOccurs="0" name="OperationName" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="Receiver" nillable="true" type="tns:AccountInfo"/><xs:element minOccurs="0" name="Sender" nillable="true" type="tns:AccountInfo"/><xs:element minOccurs="0" name="Status" type="tns:OperationStatus"/></xs:sequence></xs:complexType><xs:element name="TransactionInfo" nillable="true" type="tns:TransactionInfo"/><xs:complexType name="AccountInfo"><xs:sequence><xs:element minOccurs="0" name="AccountID" type="xs:long"/><xs:element minOccurs="0" name="Country_ISO" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="Email" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="Name" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="VerificationStatus" type="q1:VerificationStatuses" xmlns:q1="http://schemas.datacontract.org/2004/07/OkPayLink.OkPayService"/><xs:element minOccurs="0" name="WalletID" nillable="true" type="xs:string"/></xs:sequence></xs:complexType><xs:element name="AccountInfo" nillable="true" type="tns:AccountInfo"/><xs:simpleType name="OperationStatus"><xs:restriction base="xs:string"><xs:enumeration value="None"/><xs:enumeration value="Error"/><xs:enumeration value="Canceled"/><xs:enumeration value="Pending"><xs:annotation><xs:appinfo><EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">4</EnumerationValue></xs:appinfo></xs:annotation></xs:enumeration><xs:enumeration value="Reversed"><xs:annotation><xs:appinfo><EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">8</EnumerationValue></xs:appinfo></xs:annotation></xs:enumeration><xs:enumeration value="Hold"><xs:annotation><xs:appinfo><EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">16</EnumerationValue></xs:appinfo></xs:annotation></xs:enumeration><xs:enumeration value="Completed"><xs:annotation><xs:appinfo><EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">32</EnumerationValue></xs:appinfo></xs:annotation></xs:enumeration></xs:restriction></xs:simpleType><xs:element name="OperationStatus" nillable="true" type="tns:OperationStatus"/><xs:complexType name="HistoryInfo"><xs:sequence><xs:element minOccurs="0" name="PageCount" type="xs:int"/><xs:element minOccurs="0" name="PageNumber" type="xs:int"/><xs:element minOccurs="0" name="PageSize" type="xs:int"/><xs:element minOccurs="0" name="TotalCount" type="xs:int"/><xs:element minOccurs="0" name="Transactions" nillable="true" type="tns:ArrayOfTransactionInfo"/></xs:sequence></xs:complexType><xs:element name="HistoryInfo" nillable="true" type="tns:HistoryInfo"/><xs:complexType name="ArrayOfTransactionInfo"><xs:sequence><xs:element minOccurs="0" maxOccurs="unbounded" name="TransactionInfo" nillable="true" type="tns:TransactionInfo"/></xs:sequence></xs:complexType><xs:element name="ArrayOfTransactionInfo" nillable="true" type="tns:ArrayOfTransactionInfo"/><xs:complexType name="Withdrawal_Info"><xs:sequence><xs:element minOccurs="0" name="Amount" type="xs:decimal"/><xs:element minOccurs="0" name="Currency" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="ExchangeRate" type="xs:decimal"/><xs:element minOccurs="0" name="Fee" type="xs:decimal"/><xs:element minOccurs="0" name="Gross" type="xs:decimal"/><xs:element minOccurs="0" name="OperationID" type="xs:long"/><xs:element minOccurs="0" name="PaySystemTransactionID" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="PaymentMethod" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="PaymentMethodAmount" type="xs:decimal"/><xs:element minOccurs="0" name="Status" type="tns:OperationStatus"/></xs:sequence></xs:complexType><xs:element name="Withdrawal_Info" nillable="true" type="tns:Withdrawal_Info"/></xs:schema><xs:schema elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/OkPayLink.OkPayService" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://schemas.datacontract.org/2004/07/OkPayLink.OkPayService"><xs:simpleType name="VerificationStatuses"><xs:restriction base="xs:string"><xs:enumeration value="Unverified"/><xs:enumeration value="Formal"/><xs:enumeration value="Verified"/></xs:restriction></xs:simpleType><xs:element name="VerificationStatuses" nillable="true" type="tns:VerificationStatuses"/><xs:simpleType name="ClientStatus"><xs:restriction base="xs:string"><xs:enumeration value="Unregistered"/><xs:enumeration value="Registration"/><xs:enumeration value="Unverified"/><xs:enumeration value="Formal"/><xs:enumeration value="Verified"/><xs:enumeration value="Blocked"/></xs:restriction></xs:simpleType><xs:element name="ClientStatus" nillable="true" type="tns:ClientStatus"/></xs:schema></wsdl:types><wsdl:message name="I_OkPayAPI_Get_Date_Time_InputMessage"><wsdl:part name="parameters" element="tns:Get_Date_Time"/></wsdl:message><wsdl:message name="I_OkPayAPI_Get_Date_Time_OutputMessage"><wsdl:part name="parameters" element="tns:Get_Date_TimeResponse"/></wsdl:message><wsdl:message name="I_OkPayAPI_Wallet_Get_Balance_InputMessage"><wsdl:part name="parameters" element="tns:Wallet_Get_Balance"/></wsdl:message><wsdl:message name="I_OkPayAPI_Wallet_Get_Balance_OutputMessage"><wsdl:part name="parameters" element="tns:Wallet_Get_BalanceResponse"/></wsdl:message><wsdl:message name="I_OkPayAPI_Wallet_Get_Currency_Balance_InputMessage"><wsdl:part name="parameters" element="tns:Wallet_Get_Currency_Balance"/></wsdl:message><wsdl:message name="I_OkPayAPI_Wallet_Get_Currency_Balance_OutputMessage"><wsdl:part name="parameters" element="tns:Wallet_Get_Currency_BalanceResponse"/></wsdl:message><wsdl:message name="I_OkPayAPI_Send_Money_InputMessage"><wsdl:part name="parameters" element="tns:Send_Money"/></wsdl:message><wsdl:message name="I_OkPayAPI_Send_Money_OutputMessage"><wsdl:part name="parameters" element="tns:Send_MoneyResponse"/></wsdl:message><wsdl:message name="I_OkPayAPI_Transaction_Get_InputMessage"><wsdl:part name="parameters" element="tns:Transaction_Get"/></wsdl:message><wsdl:message name="I_OkPayAPI_Transaction_Get_OutputMessage"><wsdl:part name="parameters" element="tns:Transaction_GetResponse"/></wsdl:message><wsdl:message name="I_OkPayAPI_Transaction_History_InputMessage"><wsdl:part name="parameters" element="tns:Transaction_History"/></wsdl:message><wsdl:message name="I_OkPayAPI_Transaction_History_OutputMessage"><wsdl:part name="parameters" element="tns:Transaction_HistoryResponse"/></wsdl:message><wsdl:message name="I_OkPayAPI_DebitCard_Prepay_InputMessage"><wsdl:part name="parameters" element="tns:DebitCard_Prepay"/></wsdl:message><wsdl:message name="I_OkPayAPI_DebitCard_Prepay_OutputMessage"><wsdl:part name="parameters" element="tns:DebitCard_PrepayResponse"/></wsdl:message><wsdl:message name="I_OkPayAPI_Account_Check_InputMessage"><wsdl:part name="parameters" element="tns:Account_Check"/></wsdl:message><wsdl:message name="I_OkPayAPI_Account_Check_OutputMessage"><wsdl:part name="parameters" element="tns:Account_CheckResponse"/></wsdl:message><wsdl:message name="I_OkPayAPI_Withdraw_To_Ecurrency_Calculate_InputMessage"><wsdl:part name="parameters" element="tns:Withdraw_To_Ecurrency_Calculate"/></wsdl:message><wsdl:message name="I_OkPayAPI_Withdraw_To_Ecurrency_Calculate_OutputMessage"><wsdl:part name="parameters" element="tns:Withdraw_To_Ecurrency_CalculateResponse"/></wsdl:message><wsdl:message name="I_OkPayAPI_Withdraw_To_Ecurrency_InputMessage"><wsdl:part name="parameters" element="tns:Withdraw_To_Ecurrency"/></wsdl:message><wsdl:message name="I_OkPayAPI_Withdraw_To_Ecurrency_OutputMessage"><wsdl:part name="parameters" element="tns:Withdraw_To_EcurrencyResponse"/></wsdl:message><wsdl:message name="I_OkPayAPI_EX_Account_Check_InputMessage"><wsdl:part name="parameters" element="tns:EX_Account_Check"/></wsdl:message><wsdl:message name="I_OkPayAPI_EX_Account_Check_OutputMessage"><wsdl:part name="parameters" element="tns:EX_Account_CheckResponse"/></wsdl:message><wsdl:message name="I_OkPayAPI_EX_Client_Check_Status_InputMessage"><wsdl:part name="parameters" element="tns:EX_Client_Check_Status"/></wsdl:message><wsdl:message name="I_OkPayAPI_EX_Client_Check_Status_OutputMessage"><wsdl:part name="parameters" element="tns:EX_Client_Check_StatusResponse"/></wsdl:message><wsdl:portType name="I_OkPayAPI"><wsdl:operation name="Get_Date_Time"><wsdl:input wsaw:Action="https://api.okpay.com/I_OkPayAPI/Get_Date_Time" message="tns:I_OkPayAPI_Get_Date_Time_InputMessage"/><wsdl:output wsaw:Action="https://api.okpay.com/I_OkPayAPI/Get_Date_TimeResponse" message="tns:I_OkPayAPI_Get_Date_Time_OutputMessage"/></wsdl:operation><wsdl:operation name="Wallet_Get_Balance"><wsdl:input wsaw:Action="https://api.okpay.com/I_OkPayAPI/Wallet_Get_Balance" message="tns:I_OkPayAPI_Wallet_Get_Balance_InputMessage"/><wsdl:output wsaw:Action="https://api.okpay.com/I_OkPayAPI/Wallet_Get_BalanceResponse" message="tns:I_OkPayAPI_Wallet_Get_Balance_OutputMessage"/></wsdl:operation><wsdl:operation name="Wallet_Get_Currency_Balance"><wsdl:input wsaw:Action="https://api.okpay.com/I_OkPayAPI/Wallet_Get_Currency_Balance" message="tns:I_OkPayAPI_Wallet_Get_Currency_Balance_InputMessage"/><wsdl:output wsaw:Action="https://api.okpay.com/I_OkPayAPI/Wallet_Get_Currency_BalanceResponse" message="tns:I_OkPayAPI_Wallet_Get_Currency_Balance_OutputMessage"/></wsdl:operation><wsdl:operation name="Send_Money"><wsdl:input wsaw:Action="https://api.okpay.com/I_OkPayAPI/Send_Money" message="tns:I_OkPayAPI_Send_Money_InputMessage"/><wsdl:output wsaw:Action="https://api.okpay.com/I_OkPayAPI/Send_MoneyResponse" message="tns:I_OkPayAPI_Send_Money_OutputMessage"/></wsdl:operation><wsdl:operation name="Transaction_Get"><wsdl:input wsaw:Action="https://api.okpay.com/I_OkPayAPI/Transaction_Get" message="tns:I_OkPayAPI_Transaction_Get_InputMessage"/><wsdl:output wsaw:Action="https://api.okpay.com/I_OkPayAPI/Transaction_GetResponse" message="tns:I_OkPayAPI_Transaction_Get_OutputMessage"/></wsdl:operation><wsdl:operation name="Transaction_History"><wsdl:input wsaw:Action="https://api.okpay.com/I_OkPayAPI/Transaction_History" message="tns:I_OkPayAPI_Transaction_History_InputMessage"/><wsdl:output wsaw:Action="https://api.okpay.com/I_OkPayAPI/Transaction_HistoryResponse" message="tns:I_OkPayAPI_Transaction_History_OutputMessage"/></wsdl:operation><wsdl:operation name="DebitCard_Prepay"><wsdl:input wsaw:Action="https://api.okpay.com/I_OkPayAPI/DebitCard_Prepay" message="tns:I_OkPayAPI_DebitCard_Prepay_InputMessage"/><wsdl:output wsaw:Action="https://api.okpay.com/I_OkPayAPI/DebitCard_PrepayResponse" message="tns:I_OkPayAPI_DebitCard_Prepay_OutputMessage"/></wsdl:operation><wsdl:operation name="Account_Check"><wsdl:input wsaw:Action="https://api.okpay.com/I_OkPayAPI/Account_Check" message="tns:I_OkPayAPI_Account_Check_InputMessage"/><wsdl:output wsaw:Action="https://api.okpay.com/I_OkPayAPI/Account_CheckResponse" message="tns:I_OkPayAPI_Account_Check_OutputMessage"/></wsdl:operation><wsdl:operation name="Withdraw_To_Ecurrency_Calculate"><wsdl:input wsaw:Action="https://api.okpay.com/I_OkPayAPI/Withdraw_To_Ecurrency_Calculate" message="tns:I_OkPayAPI_Withdraw_To_Ecurrency_Calculate_InputMessage"/><wsdl:output wsaw:Action="https://api.okpay.com/I_OkPayAPI/Withdraw_To_Ecurrency_CalculateResponse" message="tns:I_OkPayAPI_Withdraw_To_Ecurrency_Calculate_OutputMessage"/></wsdl:operation><wsdl:operation name="Withdraw_To_Ecurrency"><wsdl:input wsaw:Action="https://api.okpay.com/I_OkPayAPI/Withdraw_To_Ecurrency" message="tns:I_OkPayAPI_Withdraw_To_Ecurrency_InputMessage"/><wsdl:output wsaw:Action="https://api.okpay.com/I_OkPayAPI/Withdraw_To_EcurrencyResponse" message="tns:I_OkPayAPI_Withdraw_To_Ecurrency_OutputMessage"/></wsdl:operation><wsdl:operation name="EX_Account_Check"><wsdl:input wsaw:Action="https://api.okpay.com/I_OkPayAPI/EX_Account_Check" message="tns:I_OkPayAPI_EX_Account_Check_InputMessage"/><wsdl:output wsaw:Action="https://api.okpay.com/I_OkPayAPI/EX_Account_CheckResponse" message="tns:I_OkPayAPI_EX_Account_Check_OutputMessage"/></wsdl:operation><wsdl:operation name="EX_Client_Check_Status"><wsdl:input wsaw:Action="https://api.okpay.com/I_OkPayAPI/EX_Client_Check_Status" message="tns:I_OkPayAPI_EX_Client_Check_Status_InputMessage"/><wsdl:output wsaw:Action="https://api.okpay.com/I_OkPayAPI/EX_Client_Check_StatusResponse" message="tns:I_OkPayAPI_EX_Client_Check_Status_OutputMessage"/></wsdl:operation></wsdl:portType><wsdl:binding name="BasicHttpBinding_I_OkPayAPI" type="tns:I_OkPayAPI"><wsp:PolicyReference URI="#BasicHttpBinding_I_OkPayAPI_policy"/><soap:binding transport="http://schemas.xmlsoap.org/soap/http"/><wsdl:operation name="Get_Date_Time"><soap:operation soapAction="https://api.okpay.com/I_OkPayAPI/Get_Date_Time" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="Wallet_Get_Balance"><soap:operation soapAction="https://api.okpay.com/I_OkPayAPI/Wallet_Get_Balance" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="Wallet_Get_Currency_Balance"><soap:operation soapAction="https://api.okpay.com/I_OkPayAPI/Wallet_Get_Currency_Balance" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="Send_Money"><soap:operation soapAction="https://api.okpay.com/I_OkPayAPI/Send_Money" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="Transaction_Get"><soap:operation soapAction="https://api.okpay.com/I_OkPayAPI/Transaction_Get" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="Transaction_History"><soap:operation soapAction="https://api.okpay.com/I_OkPayAPI/Transaction_History" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="DebitCard_Prepay"><soap:operation soapAction="https://api.okpay.com/I_OkPayAPI/DebitCard_Prepay" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="Account_Check"><soap:operation soapAction="https://api.okpay.com/I_OkPayAPI/Account_Check" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="Withdraw_To_Ecurrency_Calculate"><soap:operation soapAction="https://api.okpay.com/I_OkPayAPI/Withdraw_To_Ecurrency_Calculate" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="Withdraw_To_Ecurrency"><soap:operation soapAction="https://api.okpay.com/I_OkPayAPI/Withdraw_To_Ecurrency" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="EX_Account_Check"><soap:operation soapAction="https://api.okpay.com/I_OkPayAPI/EX_Account_Check" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="EX_Client_Check_Status"><soap:operation soapAction="https://api.okpay.com/I_OkPayAPI/EX_Client_Check_Status" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation></wsdl:binding><wsdl:service name="OkPayAPIImplementation"><wsdl:port name="BasicHttpBinding_I_OkPayAPI" binding="tns:BasicHttpBinding_I_OkPayAPI"><soap:address location="https://api.okpay.com/OkPayAPI"/></wsdl:port></wsdl:service></wsdl:definitions>
|
data/lib/okpay.rb
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
require 'savon'
|
|
2
|
+
|
|
3
|
+
module Okpay
|
|
4
|
+
class API
|
|
5
|
+
class Client
|
|
6
|
+
|
|
7
|
+
class ::String
|
|
8
|
+
def camelize
|
|
9
|
+
self.gsub!(/^[a-z]|[\s_]+[a-z]/) { |a| a.upcase }
|
|
10
|
+
self.gsub!(/[\s_]/, '')
|
|
11
|
+
self
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
DEFAULTS = {
|
|
16
|
+
:wsdl => File.join(File.dirname(File.expand_path(__FILE__)), '../config/wsdl.xml')
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
METHODS = {
|
|
20
|
+
:get_date_time => [],
|
|
21
|
+
:wallet_get_balance => [],
|
|
22
|
+
:wallet_get_currency_balance => [:currency],
|
|
23
|
+
:send_money => [:reciever, :currency, :amount, :comment, :is_receiver_pays_fees, :invoice],
|
|
24
|
+
:account_check => [:account],
|
|
25
|
+
:transaction_get => [:txn_id, :invoice],
|
|
26
|
+
:transaction_history => [:from, :till, :page_size, :page_number],
|
|
27
|
+
:debiit_card_prepay => [:email, :currency, :is_courier_delivery, :comment],
|
|
28
|
+
:withdraw_to_ecurrency => [:payment_method, :pay_system_account, :amount, :currency, :fees_from_amount, :invoice],
|
|
29
|
+
:withdraw_to_ecurrency_calculate => [:payment_method, :amount, :currency, :fees_from_amount]
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
def initialize(wallet_id, api_key, options={})
|
|
33
|
+
@api_key = api_key.strip
|
|
34
|
+
@wallet_id = wallet_id.strip
|
|
35
|
+
@config = DEFAULTS.merge! options
|
|
36
|
+
@soap_client = Savon.client(wsdl: @config[:wsdl])
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
METHODS.each_pair do |method,args|
|
|
40
|
+
class_eval %{
|
|
41
|
+
def #{method}(#{args.join(',')})
|
|
42
|
+
message = {"WalletID" => @wallet_id, "SecurityToken" => security_token}
|
|
43
|
+
#{args}.each do |arg|
|
|
44
|
+
message[arg.to_s.camelize] = eval arg.to_s
|
|
45
|
+
end
|
|
46
|
+
response = @soap_client.call(:#{method}, message: message)
|
|
47
|
+
response.body[:#{method}_response][:#{method}_result]
|
|
48
|
+
end
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
private
|
|
53
|
+
|
|
54
|
+
def security_token
|
|
55
|
+
okpay_timestamp = Time.now.utc.strftime('%Y%m%d:%H')
|
|
56
|
+
Digest::SHA256.hexdigest("#{@api_key}:#{okpay_timestamp}").to_s.upcase
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: okpay
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: '0.1'
|
|
5
|
+
prerelease:
|
|
6
|
+
platform: ruby
|
|
7
|
+
authors:
|
|
8
|
+
- Jamie Quint
|
|
9
|
+
autorequire:
|
|
10
|
+
bindir: bin
|
|
11
|
+
cert_chain: []
|
|
12
|
+
date: 2013-04-18 00:00:00.000000000 Z
|
|
13
|
+
dependencies:
|
|
14
|
+
- !ruby/object:Gem::Dependency
|
|
15
|
+
name: savon
|
|
16
|
+
requirement: &18010500 !ruby/object:Gem::Requirement
|
|
17
|
+
none: false
|
|
18
|
+
requirements:
|
|
19
|
+
- - ! '>='
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: '0'
|
|
22
|
+
type: :runtime
|
|
23
|
+
prerelease: false
|
|
24
|
+
version_requirements: *18010500
|
|
25
|
+
description:
|
|
26
|
+
email: jamiequint@gmail.com
|
|
27
|
+
executables: []
|
|
28
|
+
extensions: []
|
|
29
|
+
extra_rdoc_files: []
|
|
30
|
+
files:
|
|
31
|
+
- lib/okpay.rb
|
|
32
|
+
- config/wsdl.xml
|
|
33
|
+
homepage: https://github.com/jamiequint/okpay-ruby
|
|
34
|
+
licenses: []
|
|
35
|
+
post_install_message:
|
|
36
|
+
rdoc_options: []
|
|
37
|
+
require_paths:
|
|
38
|
+
- lib
|
|
39
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
40
|
+
none: false
|
|
41
|
+
requirements:
|
|
42
|
+
- - ! '>='
|
|
43
|
+
- !ruby/object:Gem::Version
|
|
44
|
+
version: '0'
|
|
45
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
46
|
+
none: false
|
|
47
|
+
requirements:
|
|
48
|
+
- - ! '>='
|
|
49
|
+
- !ruby/object:Gem::Version
|
|
50
|
+
version: '0'
|
|
51
|
+
requirements: []
|
|
52
|
+
rubyforge_project:
|
|
53
|
+
rubygems_version: 1.8.11
|
|
54
|
+
signing_key:
|
|
55
|
+
specification_version: 3
|
|
56
|
+
summary: A simple library to deal with the OKPay SOAP API
|
|
57
|
+
test_files: []
|