Hulp met Targetpay iDeal API/Class

Gestart doorJosnl13 reacties35 weergaven

14 berichten · pagina 1 van 1

Josnl

Lid · Topicstarter

Berichten
3.461
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Goedenavond,

Ik ben bezig met het inbouwen van een iDeal betaalmethode via TargetPay, echter wil dit niet helemaal lukken...bloos
Ik gebruik deze codes, ze zijn van TargetPay:

TargetPayIdeal.class.php

[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #FF8000]/**
* TargetPay ideal example class
* 
*  SVE
*  11-01-2009
*/
  
# requires the init class[/COLOR]
[URL="http://www.php.net/require_once"]require_once[/URL] [COLOR= #007700]([/COLOR] [COLOR= #DD0000]TargetPay.class.php[/COLOR] [COLOR= #007700]);[/COLOR]
  
[URL="http://www.php.net/class"]class[/URL] TargetPayIdeal extends TargetPay [COLOR= #007700]{[/COLOR]
  
  [COLOR= #FF8000]# ofcourse construct[/COLOR]
  [URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] __construct[COLOR= #007700]([/COLOR] [COLOR= #0000BB]$intRtlo[/COLOR] [COLOR= #007700]) {[/COLOR]
    [COLOR= #FF8000]# call parent constructor [/COLOR]
    parent[COLOR= #007700]::[/COLOR]__construct[COLOR= #007700]([/COLOR] [COLOR= #0000BB]$intRtlo[/COLOR] [COLOR= #007700]);
  }[/COLOR]
  
  [COLOR= #FF8000]/**
  * @Desc start payment
  * @Return array ( trxid, idealReturnUrl )
  */[/COLOR]
  
    [URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] startPayment [COLOR= #007700]() {[/COLOR]
      
      try [COLOR= #007700]{[/COLOR]
          
          
          [COLOR= #FF8000]# Build parameter string
          //$aParameters = $this->getBaseRequest();[/COLOR]
          [COLOR= #0000BB]$aParameters[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/array"]array[/URL][COLOR= #007700]();[/COLOR]
          [COLOR= #0000BB]$aParameters[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]rtlo[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]intRtlo[COLOR= #007700];[/COLOR]
          [COLOR= #0000BB]$aParameters[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bank[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]idealIssuer[COLOR= #007700];[/COLOR]
          [COLOR= #0000BB]$aParameters[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]description[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]strDescription[COLOR= #007700];[/COLOR]
          [COLOR= #0000BB]$aParameters[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]currency[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]strCurrency[COLOR= #007700];[/COLOR]
          [COLOR= #0000BB]$aParameters[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]amount[/COLOR][COLOR= #007700]] =[/COLOR]  [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]idealAmount[COLOR= #007700];[/COLOR]
          [COLOR= #0000BB]$aParameters[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]language[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]strLanguage[COLOR= #007700];[/COLOR]
          [COLOR= #0000BB]$aParameters[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]returnurl[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]strReturnUrl[COLOR= #007700];[/COLOR]
          [COLOR= #0000BB]$aParameters[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]reporturl[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]strReportUrl[COLOR= #007700];[/COLOR]
          
          [COLOR= #FF8000]# do request[/COLOR]
          [COLOR= #0000BB]$strResponse[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]getResponse[COLOR= #007700]([/COLOR] [COLOR= #0000BB]$aParameters[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]https://www.targetpay.com/ideal/start?[/COLOR][COLOR= #007700]);[/COLOR]
          [COLOR= #0000BB]$aResponse[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/explode"]explode[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]|[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$strResponse[/COLOR] [COLOR= #007700]);[/COLOR]

          [COLOR= #FF8000]# Bad response[/COLOR]
          [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]( ![/COLOR][URL="http://www.php.net/isset"]isset[/URL] [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$aResponse[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]] ) ) {[/COLOR]
            throw [COLOR= #007700]new[/COLOR] Exception[COLOR= #007700]([/COLOR] [COLOR= #DD0000]Error[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$aResponse[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]] );    
          }[/COLOR]
          
          [COLOR= #0000BB]$iTrxID[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/explode"]explode[/URL] [COLOR= #007700]([/COLOR] [COLOR= #DD0000] [/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$aResponse[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]] );[/COLOR]
          
          [COLOR= #FF8000]# We return TRXid and url to rederict[/COLOR]
          [URL="http://www.php.net/return"]return[/URL] [URL="http://www.php.net/array"]array[/URL] [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$iTrxID[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$aResponse[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]] );
              
      }[/COLOR] 
      catch[COLOR= #007700]([/COLOR] Exception [COLOR= #0000BB]$e[/COLOR] [COLOR= #007700]) {[/COLOR]
      
        [COLOR= #FF8000]# error, could not proceed [/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$e[/COLOR][COLOR= #007700]->[/COLOR]getMessage[COLOR= #007700]();
      
      }    
  }[/COLOR]
 
  
  
  
  [COLOR= #FF8000]/**
   * Validate the payment now by trxId
   *
   * @return bool
   */[/COLOR]
  
   [URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] validatePayment [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$intTrxId[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$iOnce[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$iTest[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]0[/COLOR] [COLOR= #007700]) {[/COLOR]
       
       try [COLOR= #007700]{[/COLOR]
        
           [COLOR= #FF8000]# Build parameter string[/COLOR]
           [COLOR= #0000BB]$aParameters[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/array"]array[/URL][COLOR= #007700]();[/COLOR]
           [COLOR= #0000BB]$aParameters[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]rtlo[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]intRtlo[COLOR= #007700];[/COLOR]
           [COLOR= #0000BB]$aParameters[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]trxid[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$intTrxId[/COLOR][COLOR= #007700];[/COLOR]
           [COLOR= #0000BB]$aParameters[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]once[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$iOnce[/COLOR][COLOR= #007700];[/COLOR]
           [COLOR= #0000BB]$aParameters[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]test[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$iTest[/COLOR][COLOR= #007700];[/COLOR] 
           
           [COLOR= #FF8000]# do request[/COLOR]
           [COLOR= #0000BB]$strResponse[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]getResponse [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$aParameters[/COLOR] [COLOR= #007700],[/COLOR] [COLOR= #DD0000]https://www.targetpay.com/ideal/check?[/COLOR][COLOR= #007700]);[/COLOR]
           [COLOR= #0000BB]$aResponse[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/explode"]explode[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]|[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$strResponse[/COLOR] [COLOR= #007700]);[/COLOR]

           [COLOR= #FF8000]# Bad response[/COLOR]
           [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR]  [COLOR= #0000BB]$aResponse[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]] !=[/COLOR] [COLOR= #DD0000]000000 OK[/COLOR] [COLOR= #007700]) {[/COLOR]
                throw [COLOR= #007700]new[/COLOR] Exception[COLOR= #007700]([/COLOR] [COLOR= #0000BB]$aResponse[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]] );    
           }[/COLOR]
           
           [URL="http://www.php.net/return"]return[/URL] true[COLOR= #007700];
       
       }[/COLOR]    
       catch[COLOR= #007700]([/COLOR] Exception [COLOR= #0000BB]$e[/COLOR] [COLOR= #007700]) {[/COLOR]
      
        [COLOR= #FF8000]# error, could not proceed [/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$e[/COLOR][COLOR= #007700]->[/COLOR]getMessage[COLOR= #007700]();
      
      } 
               
   }[/COLOR]
   
  
  [COLOR= #FF8000]/**
  * 
  * @Desc set ideal return url
  * 
  */[/COLOR]
  
  [URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] setIdealReturnUrl [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$strReturnUrl[/COLOR] [COLOR= #007700]) {[/COLOR]
    [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]strReturnUrl [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$strReturnUrl[/COLOR][COLOR= #007700];[/COLOR]  
     [URL="http://www.php.net/return"]return[/URL] [COLOR= #0000BB]$this[/COLOR][COLOR= #007700];   
  }[/COLOR]
  
  [COLOR= #FF8000]/**
  * 
  * @Desc set ideal return url
  * 
  */[/COLOR]
  
  [URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] setIdealReportUrl [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$strReportUrl[/COLOR] [COLOR= #007700]) {[/COLOR]
    [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]strReportUrl [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$strReportUrl[/COLOR][COLOR= #007700];[/COLOR]  
     [URL="http://www.php.net/return"]return[/URL] [COLOR= #0000BB]$this[/COLOR][COLOR= #007700];   
  }[/COLOR]
  
  [COLOR= #FF8000]/**
  * 
  * @Desc set ideal description for transaction
  * 
  */[/COLOR]
  
  [URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] setIdealDescription [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$strDescription[/COLOR] [COLOR= #007700]) {[/COLOR]
    [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]strDescription [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$strDescription[/COLOR][COLOR= #007700];[/COLOR]  
     [URL="http://www.php.net/return"]return[/URL] [COLOR= #0000BB]$this[/COLOR][COLOR= #007700];   
  }[/COLOR]
  
  [COLOR= #FF8000]/**
  * @Desc set ideal amount
  * 
  */[/COLOR]
  
  [URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] setIdealAmount [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$intIdealAmount[/COLOR] [COLOR= #007700]) {[/COLOR]
    
      [COLOR= #FF8000]# Is this a valid ideal amount?[/COLOR]
      [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR] [URL="http://www.php.net/is_numeric"]is_numeric[/URL] [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$intIdealAmount[/COLOR] [COLOR= #007700]) &&[/COLOR] [COLOR= #0000BB]$intIdealAmount[/COLOR] [COLOR= #007700]>[/COLOR] [COLOR= #0000BB]0[/COLOR] [COLOR= #007700]) {[/COLOR]
        [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]idealAmount [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$intIdealAmount[/COLOR][COLOR= #007700];    
      }[/COLOR]
      [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
        throw [COLOR= #007700]new[/COLOR] Exception[COLOR= #007700]([/COLOR] [COLOR= #DD0000]Invalid ideal amount, please check.[/COLOR] [COLOR= #007700]);   
      }[/COLOR]
       [URL="http://www.php.net/return"]return[/URL] [COLOR= #0000BB]$this[/COLOR][COLOR= #007700];
  }[/COLOR]
  
  [COLOR= #FF8000]/**
  * @Desc set ideal issuer
  * 
  */[/COLOR]
  
  [URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] setIdealissuer [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$intIdealIssuer[/COLOR] [COLOR= #007700]) {[/COLOR]

        [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]idealIssuer [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$intIdealIssuer[/COLOR][COLOR= #007700];[/COLOR]    

        [URL="http://www.php.net/return"]return[/URL] [COLOR= #0000BB]$this[/COLOR][COLOR= #007700];
  }[/COLOR]
  
  [COLOR= #FF8000]/**
  * Get available issuers, and return array
  *
  * @return array
  */
    
//  public static function getBanks() {
//    return array(0031=>ABN AMRO Bank, 0761=>ASN Bank, 0081=>Fortis Bank, 0091=>Friesland Bank, 0721=>ING Bank, 0021=>Rabobank, 0751=>SNS Bank, 0771=>SNS Regio Bank);
//  }[/COLOR]
  
[COLOR= #007700]}[/COLOR]
  
  
?>


TargetPay.class.php

[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #FF8000]/**
* TargetPay Example class
* 
* SVE
* 
* 11-01-2009
*/[/COLOR]
  
abstract [URL="http://www.php.net/class"]class[/URL] TargetPay [COLOR= #007700]{[/COLOR]
    
   [COLOR= #FF8000]/**
   * @var int rtlo partner ID 
   */[/COLOR]
    [URL="http://www.php.net/protected"]protected[/URL] [COLOR= #0000BB]$intRtlo[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700];[/COLOR]
    
    
    [COLOR= #FF8000]/**
    * @desc construction class
    * @Var int rtlo partner ID
    */[/COLOR]
    
    [URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] __construct[COLOR= #007700]([/COLOR] [COLOR= #0000BB]$intRtlo[/COLOR] [COLOR= #007700]) {[/COLOR]
        [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]setRtlo [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$intRtlo[/COLOR] [COLOR= #007700]);
    }[/COLOR]
    
   [COLOR= #FF8000]/**
   * Get response for a targetpay request
   * 
   * @param array $aParams
   * @return string
   */[/COLOR]
   
    [URL="http://www.php.net/protected"]protected[/URL] [COLOR= #007700]function[/COLOR] getResponse[COLOR= #007700]([/COLOR] [COLOR= #0000BB]$aParams[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$sRequest[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]https://www.targetpay.com/api/plugandpay?[/COLOR]  [COLOR= #007700]) {[/COLOR]
      
        [COLOR= #FF8000]# convert params[/COLOR]
        [COLOR= #0000BB]$strParamString[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]makeParamString[COLOR= #007700]([/COLOR] [COLOR= #0000BB]$aParams[/COLOR] [COLOR= #007700]);[/COLOR]
                   
        [COLOR= #FF8000]# get request[/COLOR]
        [COLOR= #0000BB]$strResponse[/COLOR] [COLOR= #007700]= @[/COLOR][URL="http://www.php.net/file_get_contents"]file_get_contents[/URL][COLOR= #007700]([/COLOR] [COLOR= #0000BB]$sRequest[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$strParamString[/COLOR][COLOR= #007700]);[/COLOR]
        [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$strResponse[/COLOR] [COLOR= #007700]===[/COLOR] false [COLOR= #007700])[/COLOR]
            throw [COLOR= #007700]new[/COLOR] Exception[COLOR= #007700]([/COLOR][COLOR= #DD0000]Could not fetch response[/COLOR][COLOR= #007700]);[/COLOR]
        
        [URL="http://www.php.net/return"]return[/URL] [COLOR= #0000BB]$strResponse[/COLOR][COLOR= #007700];
    
    }[/COLOR]
    
   [COLOR= #FF8000]/**
   * Make string from params
   * 
   * @param array $aParams
   * @return string
   */[/COLOR]
   
   [URL="http://www.php.net/protected"]protected[/URL] [COLOR= #007700]function[/COLOR] makeParamString[COLOR= #007700]([/COLOR] [COLOR= #0000BB]$aParams[/COLOR] [COLOR= #007700]) {[/COLOR]
      
        [COLOR= #0000BB]$strString[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700];[/COLOR]
        [URL="http://www.php.net/foreach"]foreach[/URL] [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$aParams[/COLOR] [COLOR= #007700]as[/COLOR] [COLOR= #0000BB]$strKey[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #0000BB]$strValue[/COLOR] [COLOR= #007700])[/COLOR] 
          [COLOR= #0000BB]$strString[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]&[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/urlencode"]urlencode[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$strKey[/COLOR][COLOR= #007700]) .[/COLOR] [COLOR= #DD0000]=[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/urlencode"]urlencode[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$strValue[/COLOR][COLOR= #007700]);[/COLOR]
        
        [COLOR= #FF8000]# remove first &  [/COLOR]
        [URL="http://www.php.net/return"]return[/URL] [URL="http://www.php.net/substr"]substr[/URL][COLOR= #007700]([/COLOR] [COLOR= #0000BB]$strString[/COLOR] [COLOR= #007700],[/COLOR][COLOR= #0000BB]1[/COLOR] [COLOR= #007700])  ;          
    
    }[/COLOR]
    
    [COLOR= #FF8000]/**
    * Get the base request with IP, RTLO, domain,
    * 
    * @return array
    */[/COLOR]
    [URL="http://www.php.net/protected"]protected[/URL] [COLOR= #007700]function[/COLOR] getBaseRequest[COLOR= #007700]() {[/COLOR]
      
      [COLOR= #FF8000]# return array with base parameters[/COLOR]
      [COLOR= #0000BB]$aParams[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/array"]array[/URL][COLOR= #007700]();[/COLOR]
      [COLOR= #0000BB]$aParams[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]action[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #DD0000]start[/COLOR][COLOR= #007700];[/COLOR]
      [COLOR= #0000BB]$aParams[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]ip[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]];[/COLOR]
      [COLOR= #0000BB]$aParams[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]domain[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]strDomain [COLOR= #007700];[/COLOR]
      [COLOR= #0000BB]$aParams[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]rtlo[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]intRtlo [COLOR= #007700];[/COLOR]
        
        [URL="http://www.php.net/return"]return[/URL] [COLOR= #0000BB]$aParams[/COLOR][COLOR= #007700];
    
    }[/COLOR]
    
    [COLOR= #FF8000]/**
    * @desc set domain
    * 
    */[/COLOR]
    
    [URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] setDomain [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$strDomain[/COLOR] [COLOR= #007700]) {[/COLOR]
        [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]strDomain [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$strDomain[/COLOR][COLOR= #007700];   
    }[/COLOR]
    
    [COLOR= #FF8000]/**
    * @desc set rtlo partner id
    * @Var int rtlo partner ID
    */[/COLOR]
    
    [URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] setRtlo [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$intRtlo[/COLOR] [COLOR= #007700]) {[/COLOR]
        [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]intRtlo [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$intRtlo[/COLOR][COLOR= #007700];   
    }[/COLOR]
    
    [COLOR= #FF8000]/**
    * Return rtlo
    *
    * @return int
    */[/COLOR] 
     
    [URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] getRtlo [COLOR= #007700]() {[/COLOR]
        [URL="http://www.php.net/return"]return[/URL] [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]intRtlo[COLOR= #007700];   
    }     
}[/COLOR]

?>


Hier moet ie verwerkt worden, ideal.php

[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #FF8000]/**
* Ideal example on how to use the ideal class!
* 
* SVE
* 
* 11-01-2009 
* 
*/[/COLOR]
[URL="http://www.php.net/require_once"]require_once[/URL] [COLOR= #007700]([/COLOR] [COLOR= #DD0000]TargetPayIdeal.class.php[/COLOR][COLOR= #007700]);[/COLOR]

[COLOR= #0000BB]$iRtlo[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]35348[/COLOR][COLOR= #007700];[/COLOR]

[COLOR= #FF8000]# Set ideal amount in cents so 500 cent will be 5 euro[/COLOR]
[COLOR= #0000BB]$iAmount[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]799[/COLOR][COLOR= #007700];[/COLOR]

[COLOR= #FF8000]# Set return url from your website[/COLOR]
[COLOR= #0000BB]$iReturnurl[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"http://onehosted.nl/msf/berichten.php"[/COLOR][COLOR= #007700];[/COLOR]

[COLOR= #FF8000]# Set report url to recieve the status of transactions not retreived by the returnurl[/COLOR]
[COLOR= #0000BB]$iReporturl[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"http://onehosted.nl/msf/reportscript.php"[/COLOR][COLOR= #007700];[/COLOR]

[COLOR= #0000BB]$iIssuer[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR] [COLOR= #DD0000]"bank"[/COLOR] [COLOR= #007700]];[/COLOR]


[COLOR= #FF8000]/**
* This function will validate the payment after returning from the bank
*/
# ?action=validate&trxid= trxid[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR] [URL="http://www.php.net/isset"]isset[/URL] [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]ec[/COLOR][COLOR= #007700]] ) &&[/COLOR] [URL="http://www.php.net/isset"]isset[/URL] [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]trxid[/COLOR][COLOR= #007700]] ) ) {[/COLOR]
    [COLOR= #FF8000]# Init the class[/COLOR]
    [COLOR= #0000BB]$oIdeal[/COLOR] [COLOR= #007700]= new[/COLOR] TargetPayIdeal [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$iRtlo[/COLOR] [COLOR= #007700]);[/COLOR]
[COLOR= #FF8000]//    $oIdeal->setDomain ( www.mijndomein.nl );[/COLOR]

    [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$oIdeal[/COLOR][COLOR= #007700]->[/COLOR]validatePayment [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]trxid[/COLOR][COLOR= #007700]]  ) ==[/COLOR] true [COLOR= #007700]) {[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]De betaling was geslaagd[/COLOR][COLOR= #007700];   
    }[/COLOR]
    [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]De betaling was (nog) niet geslaagd[/COLOR][COLOR= #007700];   
    }  
}[/COLOR]
[URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$iIssuer[/COLOR]  [COLOR= #007700]==[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])
{[/COLOR]
[COLOR= #FF8000]/*
*  Choose your bank
*/[/COLOR]

?>

<!-- DIT HEB IK ZELF GEDAAN (de php code in de action) ALLEEN WORDEN DE PARAMETERS NIET MEEGESTUURD! -->

    <form method="get" name="idealform" action="http://www.targetpay.com/ideal/start?&rtlo=[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$iRtlo[/COLOR][COLOR= #007700];[/COLOR] ?>[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$iIssuer[/COLOR][COLOR= #007700];[/COLOR] ?>">
    <i>Maak een keuze uit de volgende banken...</i><br>
    <select name="bank"><script src="http://www.targetpay.com/ideal/issuers-nl.js"></script></select>&nbsp;&nbsp;
    <INPUT TYPE=submit VALUE="Ga verder"></form>
[COLOR= #0000BB]<?[/COLOR]    
    
[COLOR= #007700]}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR] 
[COLOR= #FF8000]/*
*  Initiate payment
*/[/COLOR]
    
[URL="http://www.php.net/ini_set"]ini_set[/URL] [COLOR= #007700]([/COLOR] [COLOR= #DD0000]display_errors[/COLOR] [COLOR= #007700],[/COLOR] [COLOR= #DD0000]1[/COLOR][COLOR= #007700]);[/COLOR]



[COLOR= #FF8000]# To initiate a payment, initiate the class[/COLOR]
[COLOR= #0000BB]$oIdeal[/COLOR] [COLOR= #007700]= new[/COLOR] TargetPayIdeal [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$iRtlo[/COLOR] [COLOR= #007700]);[/COLOR]

[COLOR= #FF8000]# Set ideal amount in cents so 500 cent will be 5 euro[/COLOR]
[COLOR= #0000BB]$oIdeal[/COLOR][COLOR= #007700]->[/COLOR]setIdealAmount [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$iAmount[/COLOR] [COLOR= #007700]);[/COLOR]

[COLOR= #FF8000]# Set ideal issuer[/COLOR]
[COLOR= #0000BB]$oIdeal[/COLOR][COLOR= #007700]->[/COLOR]setIdealissuer [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$iIssuer[/COLOR] [COLOR= #007700]);[/COLOR]

[COLOR= #FF8000]# Set ideal description[/COLOR]
[COLOR= #0000BB]$oIdeal[/COLOR][COLOR= #007700]->[/COLOR]setIdealDescription [COLOR= #007700]([/COLOR] [COLOR= #DD0000]Dit is een test betaling[/COLOR][COLOR= #007700]);[/COLOR]

[COLOR= #FF8000]# Set return url, wich should return on succes[/COLOR]
[COLOR= #0000BB]$oIdeal[/COLOR][COLOR= #007700]->[/COLOR]setIdealReturnUrl [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$iReturnurl[/COLOR] [COLOR= #007700]);[/COLOR]

[COLOR= #FF8000]# Set report url [/COLOR]
[COLOR= #0000BB]$oIdeal[/COLOR][COLOR= #007700]->[/COLOR]setIdealReportUrl [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$iReporturl[/COLOR] [COLOR= #007700]);[/COLOR]

[COLOR= #FF8000]# Now we can initiate the payment[/COLOR]
[COLOR= #0000BB]$aReturn[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$oIdeal[/COLOR][COLOR= #007700]->[/COLOR]startPayment[COLOR= #007700]();[/COLOR]

[COLOR= #FF8000]# This is the transaction id[/COLOR]
[COLOR= #0000BB]$intTrxId[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$aReturn[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]];[/COLOR]

[COLOR= #FF8000]# this will be the bank url that will rederect to the bank.[/COLOR]
[COLOR= #0000BB]$strBankURL[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$aReturn[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]];[/COLOR]

[COLOR= #FF8000]# For check we can echo it here. (uncomment if you want to see. )
//echo Transaction ID: . $intTrxId . <br/>Bank URL: . $strBankURL;

/**
* This haader function will redirect the browser to the bank
*/[/COLOR]
[COLOR= #007700]}[/COLOR]
 
  
?>


En op deze pagina heb ik ideal.php geïnclude:

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/session_start"]session_start[/URL][COLOR= #007700]();[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"config.php"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"TargetPay.class.php"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"TargetPayIdeal.class.php"[/COLOR][COLOR= #007700]);[/COLOR]
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

    <title></title>
    
    <link rel="stylesheet" type="text/css" href="style.css" />
    
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push([_setAccount, UA-9735576-49]);
  _gaq.push([_trackPageview]);

  (function() {
    var ga = document.createElement(script); ga.type = text/javascript; ga.async = true;
    ga.src = (https: == document.location.protocol ? https://ssl : http://www) + .google-analytics.com/ga.js;
    var s = document.getElementsByTagName(script)[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
    
<meta name="google-site-verification" content="jRkXoKxOrOrF-6H2CyIk3LNNjIYBHgXQoa7f282VQcE" />
<meta http-equiv="Content-Language" content="nl"> 
<meta name="description" content="">
<meta name="">
<meta name="author" content="">
<meta name="robots" content="index, follow">
<meta name="revisit-after" content="3 month">
    
</head>


    <body>

        <div id="header"></div>   
        
            <div id="menu">    <a href="#">Startpagina</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <a href="#">Registreren</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <a href="#">Fotos</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <a href="#">Leden</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <a href="#">Tell-a-friend</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <a href="#">Bookmark</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <a href="#">Info</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <a href="#">Contactformulier</a>
            </div>
            [COLOR= #0000BB]<?php 
            
            $bQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT aan FROM berichten WHERE aan="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" AND gelezen= 0 "[/COLOR][COLOR= #007700]);[/COLOR]
            [COLOR= #0000BB]$bAantal[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$bQuery[/COLOR][COLOR= #007700]);[/COLOR]
            [COLOR= #0000BB]$bTotaal[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$bAantal[/COLOR][COLOR= #007700];[/COLOR]
            
            [COLOR= #0000BB]$query_credits[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM gebruikers WHERE gebruikersnaam="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
                        
                        [URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$rij_credits[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query_credits[/COLOR][COLOR= #007700])){[/COLOR]
                            
                            [COLOR= #0000BB]$credits_1[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$rij_credits[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]mail_credits[/COLOR][COLOR= #007700]];
                            
                        }[/COLOR]                            
            
            [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]])){[/COLOR]
                    
                        [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000][/COLOR][COLOR= #007700];
                    
            }[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]                
                
                    [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]<div id="leden_menu">
<a href="berichten.php"><img src="images/bericht.png" class="bericht" alt="Berichten" />Berichten <strong>([/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$bAantal[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000])</strong></a>

<a href="uitloggen.php"><img src="images/uitloggen.png" class="uitloggen" alt="Uitloggen" /></a>

<a href="koopcredits.php"><img src="images/credits.png" class="credits" alt="Credits" />[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$credits_1[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]</a>

<a href="profiel.php?gebruikersnaam=[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"><img src="images/profiel.png" class="profiel" alt="Profiel" /></a>
</div>[/COLOR][COLOR= #007700];

            }[/COLOR]
            
            ?>   
            
                <div class="container">
            
                        <div class="content-top">Mail credits kopen</div>
                        <div class="content-mid">
                        
            [COLOR= #0000BB]<?php[/COLOR]
                            
            [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]])){[/COLOR]
                            
                            [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]<div class="fout">Om deze pagina te zien moet je ingelogd zijn.</div>[/COLOR][COLOR= #007700];

                                }[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR] 
                            
                                    [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]Hier kan je mail credits kopen voor je account zodat je kunt mailen met de andere leden!<br /><br />[/COLOR][COLOR= #007700];[/COLOR]
                                    [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]<strong>Tarieven*:</strong><br />10 credits - &euro;7,99<br />15 credits - &euro;14,99<br />30 credits - &euro;24,99<br /><br />[/COLOR][COLOR= #007700];[/COLOR]
                                    [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]Maak hieronder uw keuze om de credits te bestellen! Betaling gaat via iDeal (online overschrijven).[/COLOR][COLOR= #007700];[/COLOR]
                                    [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]<br /><br />[/COLOR][COLOR= #007700];[/COLOR]
                                    [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]<iframe src="ideal.php" frameborder="0" />[/COLOR][COLOR= #007700];
                        
                                }[/COLOR]
                                
            ?>
                        <br /><br /><font size="1">*Bedrag is inclusief btw!</font>
                        </div>
                        
                        <div class="content-bottom"></div>

                        <div id="copyright">&copy; Copyright 2010-2011  |  Alle rechten voorbehouden</div>
            
                </div>  
            
    </body>
    

</html>


Het probleem is dat als de bank geselecteerd is, en er op Ga Verder word gedrukt, hij niet de goede parameters meegeeft, welke wel zijn ingevuld.

Ik hoop dat iemand hier meer verstand van heeft als ik en me wilt helpen, eventueel (als het niet anders kan) tegen betaling in o2xs punten.

Mvg,

Josshiny
0
Berichten
4.214
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Even snel ovrheen gekeken omdat ik haast heb maar je hebt bij je form dit name="idealform" en bij de issuser heb je bank (Komt niet overeen, wat ik ook niet snap is waarom je die issuser wil printen in de url die in je form staat die is toch blank anders krijg je dat niet
0
Josnl

Lid · Topicstarter

Berichten
3.461
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik denk dat alles wel redelijk klopt, want heb dit allemaal compleet overgenomen van TargetPay. Het enige probleem is dat ik niet zie waar de url gemaakt word, want daarin moet ik bepaalde gegevens zetten.
0
Berichten
4.214
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Kijk is naar het stukje waar met koeien letters "DIT HEB IK ZELF GEDAAN", ik heb het over dat stukje en ik neem aan dat dat niet vanuit Target pay komt.

<form method="get" name="idealform">
    <i>Maak een keuze uit de volgende banken...</i><br>
    <select name="bank"><script src="http://www.targetpay.com/ideal/issuers-nl.js"></script></select>&nbsp;&nbsp;
    <INPUT TYPE=submit VALUE="Ga verder"></form>
0
Josnl

Lid · Topicstarter

Berichten
3.461
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Sorry, daar stond eerst nog een action...bloos Die heb ik weggehaald omdat daar niks mee werd gedaan.sadley
0
Berichten
13.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
met method="get" kun je geen parameters meegeven in de url, je moet ze dan bijvoorbeeld als doen
0
Josnl

Lid · Topicstarter

Berichten
3.461
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Maar met $_POST[]; wel dan?
0
Berichten
4.214
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Waaom wil je uberhoud niet hidden fields doen zoals ik al zij? dat is de makkelijkste manier of je nou post of get doet met bijde moet je toch (Of is aan te raden) hidden field

Edit: ow ik zie dat ik in dat stukje code geen hidden form object heb staan, raar want hier staat dream weaver nog open met wel een hidden field

Maaruh waarom wil je je Targetpay nummer mee posten als je die ook al aan hebt moeten geven bovenin de pagina, beetje dubbelzeidig en tricky een beetje slim iemand kan zo mooi het geld naar hem sluizen en jouw product kopen (rtlo is je target pay account nummer)
0
Josnl

Lid · Topicstarter

Berichten
3.461
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Die code die in de url mee gaat is de layoutcode o.i.d.smile
0
Berichten
4.214
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ow... $iRtlo = 35348; ik vind het wel vreemd dat iRtlo in elk ander TargetPay API iets heeel anders betkend, namelijk je Target Pay ID.

Want waar word anders volgens jouw je Target Pay ID geroepen ?
0
Josnl

Lid · Topicstarter

Berichten
3.461
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Nee, de $iRtlo is de layoutcode volgens de site van TargetPay.wink
0
Berichten
13.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Josnl schreef:
Nee, de $iRtlo is de layoutcode volgens de site van TargetPay.winkhet zal dan wel voor Ringtoniolayout staan.. biggrin
edit: maar je doet het ook verkeerd

je hebt:

<!-- DIT HEB IK ZELF GEDAAN (de php code in de action) ALLEEN WORDEN DE PARAMETERS NIET MEEGESTUURD! -->

    <form method="get" name="idealform" action="http://www.targetpay.com/ideal/start?&rtlo=[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$iRtlo[/COLOR][COLOR= #007700];[/COLOR] ?>[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$iIssuer[/COLOR][COLOR= #007700];[/COLOR] ?>">
    <i>Maak een keuze uit de volgende banken...</i><br>
    <select name="bank"><script src="http://www.targetpay.com/ideal/issuers-nl.js"></script></select>&nbsp;&nbsp;
    <INPUT TYPE=submit VALUE="Ga verder"></form>
maar je moet het gewoon naar hetzelfde bestand laten sturen, en die ziet dat je de bank meestuurt, dus die hoort je dan verder te sturen naar je bank om te betalen wink
het hoort gewoon dit te zijn:
<form method=get name=idealform>
    Choose your bank<br>
    <select name="bank"><script src="http://www.targetpay.com/ideal/issuers-nl.js"></script></select>&nbsp;&nbsp;
    <INPUT TYPE=submit VALUE="Continue..."></form>


en ergens onderin dat bestand heb je ook dit weggehaald:

header( "Location: ". $strBankURL );


Als je een beetje dingen gaat veranderen van een goed script, doe het dan ook goed.. emo
0
Josnl

Lid · Topicstarter

Berichten
3.461
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ja die had ik weggehaald omdat ie verkeerd geredirect werd. (dacht ik eerst)

EDIT: Is er iemand die hem voor me in kan bouwen voor 2pt?bloos
Timmie,

Het is voor een soort van nieuw soort datingsite (concept moet geheim blijven) van een kennis van me. De leden daarop hebben de mogelijkheid om berichten te sturen, zolang ze maar credits hebben. En je raad het waarschijnlijk al; Die credits moeten ze kopen. Dit wilde ik doen m.b.v TargetPay, echter lukt het mij niet om het in te bouwen.

Ik hoop dat jij het wel voor elkaar krijgt,

Gr. Jossmile
0
Berichten
4.214
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Pm me maar het details, ik kan het zeer waarschijnlijk wel doen

Edit; naar nader lezen is het inderdaad een layout code, maar hij word ook gebruikt als herkenings nummer voor een account
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren