News:

Looking for documentation? Take a look on our wiki

Main Menu

Payment module request

Started by GetSmart, February 28, 2018, 23:58:44 PM

Previous topic - Next topic

GetSmart

Hi all,
I posting first time here. So sorry it is wrong place for the new custom payment module request.
I need to develop new custom payment module.
Please anybody write me if you can help. I give tech doc's for the mod.

Or maybe anybody can help with soapClient function?

My xml:
$XML = "<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:esh="http://eshop.gf.lt/">
   <soapenv:Header/>
   <soapenv:Body>
      <esh:StartDealSession_v2>
         <product>EL</product>
         <merchantId>some_id</merchantId>
         <orderNo>123</orderNo>
         <totalAmount>790.90</totalAmount>
         <totalAmountCurrency>EUR</totalAmountCurrency>
         <totalAmountCurrRate>1.00</totalAmountCurrRate>
         <loanAdvance>0</loanAdvance>
         <sKey>password</sKey>
         <basket>
            <!--1 or more repetitions:-->
            <item>
               <code>1112</code>
               <type>KIT</type>
               <title>TEST</title>
               <category>KIT</category>
               <service>GDT</service>
               <sum>790.90</sum>
               <amount>1</amount>
               <currency>EUR</currency>
               <rate>1.00</rate>
            </item>
         </basket>
         <returnUrl>www.myshop.com/callback</returnUrl>
      </esh:StartDealSession_v2>
   </soapenv:Body>
</soapenv:Envelope>";


$soap = new SoapClient($soapclient_link_wsdl, array('trace' => 1));
and do request:

try {
            $result = $soap->__doRequest($XML, $soaprequest_link, 'StartDealSession_v2', 0);
            if (!$result) {
            return $result;
        } else {
            return false;
        }

    } catch (Exception $e) {
        $e = 0;
        return $e;
     }

Result with  __doRequest function I getting NULL.

[mod edit. email address removed. this is an open forum so solutions may be shared]

Thank you in advance
Cheers

Studio 42

Try var_dump($soap->__getLastRequest()); to see request get from server

GetSmart

Thank you for the response.. I have tried your suggestion so I getting also NUL I'm stuck at the moment....

Studio 42


GetSmart

#4
yes i have checked  on the OpenCart I have developed this payment module and it working fine. VirtueMart no success.
when I tring this function
var_dump($soap->__getTypes());
I get this:
array(35) { [0]=> string(58) "struct GetSystemProperty { string product; string pid; }" [1]=> string(69) "struct GetSystemPropertyResponse { GetSystemPropertyResult return; }" [2]=> string(208) "struct GetSystemPropertyResult { decimal minCreditValue; decimal maxCreditValue; string partnerStatus; string ohf; string oht; string minPaymentDate; string maxPaymentDate; string loanAdvanceActive; }" [3]=> string(233) "struct StartDealSession_v2 { string product; string merchantId; string orderNo; string totalAmount; string totalAmountCurrency; string totalAmountCurrRate; string loanAdvance; string sKey; Basket basket; string returnUrl; }" [4]=> string(35) "struct Basket { BasketItem item; }" [5]=> string(160) "struct BasketItem { string code; string type; string title; string category; string service; string sum; string amount; string currency; string rate; }" [6]=> string(70) "struct StartDealSession_v2Response { StartDealSessionResult return; }" [7]=> string(56) "struct StartDealSessionResult { string dealSessionId; }" [8]=> string(56) "struct Result { int resultCode; string errorMessage; }" [9]=> string(101) "struct CalcDemoProposal_v2 { string merchantId; string amount; string advance; string maturity; }" [10]=> string(70) "struct CalcDemoProposal_v2Response { CalcDemoProposalResult return; }" [11]=> string(69) "struct CalcDemoProposalResult { calculatorResult calculatorResult; }" [12]=> string(49) "struct calculatorResult { CalculatorItem item; }" [13]=> string(96) "struct CalculatorItem { int orderNo; string code; string text; string value; string unit; }" [14]=> string(58) "struct BackendError { string message; string messages; }" [15]=> string(686) "struct StartDealSessionExt { string product; string merchantId; string orderNo; string totalAmount; string totalAmountCurrency; string totalAmountCurrRate; string loanAdvance; string customerId; string empFirstName; string empLastName; string empPersonalCode; string empPlaceId; string crFirstName; string crLastName; string crPersonalCode; string crDocumentNo; string crDocumentType; string crEmail; string crPhoneNo; string crAddrRegion; string crAddrCity; string crAddrStreet; string crAddrHouseNo; string crAddrCorpusNo; string crAddrRoomNo; string crAddrPostCode; string sKey; string selectedTerm; string authLevel; Basket basket; string returnURL; }" [16]=> string(73) "struct StartDealSessionExtResponse { StartDealSessionResultExt return; }" [17]=> string(103) "struct StartDealSessionResultExt { string dealSessionId; int resultCode; string resultDescription; }" [18]=> string(76) "struct SignDeal { string merchantId; string dealSessionId; string sKey; }" [19]=> string(43) "struct SignDealResponse { Result return; }" [20]=> string(50) "struct StartSignSession { string placeSystemId; }" [21]=> string(67) "struct StartSignSessionResponse { StartSignSessionResult return; }" [22]=> string(56) "struct StartSignSessionResult { string dealSessionId; }" [23]=> string(105) "struct CancelDealSession { string merchantId; string dealSessionId; string sKey; string reasonCode; }" [24]=> string(52) "struct CancelDealSessionResponse { Result return; }" [25]=> string(252) "struct StartLoanSession { string product; string merchantId; string orderNo; string totalAmount; string totalAmountCurrency; string totalAmountCurrRate; string selectedTerm; string monthlyPmnt; string sKey; Basket basket; string returnUrl; }" [26]=> string(67) "struct StartLoanSessionResponse { StartLoanSessionResult return; }" [27]=> string(56) "struct StartLoanSessionResult { string dealSessionId; }" [28]=> string(209) "struct StartDealSession { string product; string merchantId; string orderNo; string totalAmount; string totalAmountCurrency; string totalAmountCurrRate; string sKey; Basket basket; string returnUrl; }" [29]=> string(67) "struct StartDealSessionResponse { StartDealSessionResult return; }" [30]=> string(81) "struct CalcDemoProposal { string merchantId; string amount; string maturity; }" [31]=> string(67) "struct CalcDemoProposalResponse { CalcDemoProposalResult return; }" [32]=> string(83) "struct GetLoanDocument { string merchantId; string dealSessionId; string sKey; }" [33]=> string(65) "struct GetLoanDocumentResponse { GetLoanDocumentResult return; }" [34]=> string(66) "struct GetLoanDocumentResult { string docType; string docBody; }" }

Studio 42

If the data are right and it work with another extension, no reason it fail.
The only possibility is that you not send right datas, or client side your server do not parse the values correctly, this have really nothing to do with Joomla or Virtuemart.
Perhaps the header ? Try to do a simple PHP file and load it directly. __getLastRequest should display something

GetSmart

#6
You was right. Wrong header  of the xml. >:(   ???

Thanks a lot  ;)

Cheers