osCommerce / oscommerce2

osCommerce Online Merchant v2.x
http://www.oscommerce.com
MIT License
281 stars 222 forks source link

bank : specific return payment for 2.4 #628

Open oitsuki opened 6 years ago

oitsuki commented 6 years ago

The bank like desjardins (Canada), credit mutue (France)l as like this

https://www.xxxxxx.com:443/demo/index.php?order&desjardins&success&ho?TPE=monet14&date=12%2f07%2f2018%5fa%5f11%3a32%3a28&montant=53EUR&reference=000000000010&MAC=XXXXXXXXXXXXXXXXXXXXXXXXXX&texte-libre=jept27dsflk46n8uih9njk1e3c&code-retour=payetest&cvx=oui&vld=1219&brand=VI&status3ds=-1&numauto=000000&originecb=FRA&bincb=000001&hpancb=XXXXXXXXXXXXXXXXXXXXXXXXXX&ipclient=104%2e158%2e60%2e175&originetr=CAN&veres=&pares=&modepaiement=CB

like you can see we ho?TPE= but this doe'snt work we must have ho&TPE=

?TPE= is created by the bank. In this case, osc must take in consideration this kind of approaches or other.

oitsuki commented 6 years ago

My first approach was to change inside Apps : It resolve the ?

$route = array_keys($_GET)

//add follow possbile but on specific request with ?
    public static function getRouteValue($route) {
      $query = $_GET;
// replace parameter(s)
      $query['?'] = '&';

// rebuild url
      $query_result = http_build_query($query);
      $query_result = str_replace('%3F', '&', $query_result);

      $split_parameters = explode('&', $query_result);

      for($i = 0; $i < count($split_parameters); $i++) {
        $final_split = explode('=', $split_parameters[$i]);
        $split_complete[$final_split[0]] = $final_split[1];
      }

      $result = $split_complete;

      return $result;
    }

    public static function getRouteDestination($route = null, $filter_vendor_app = null) {

      if (empty($route)) {
//        $route = array_keys($_GET);
        $route = array_keys(static::getRouteValue($_GET));
      }
osc2nuke commented 6 years ago

you need to make your OWN Return PaymentHook (aka IPN). Forget 2.4 base............. it is not worked out enough to handle, COMMON situations.

osc2nuke commented 6 years ago

It is already stated that in 2.4 if (OSCOM::hasSitePage()) { if (OSCOM::isRPC() === false) { $page_file = OSCOM::getSitePageFile(); if (empty($page_file) || !is_file($page_file)) { $page_file = OSCOM::getConfig('dir_root') . 'includes/error_documents/404.php'; } if (OSCOM::useSiteTemplateWithPageFile()) { include($oscTemplate->getFile('template_top.php')); } include($page_file); if (OSCOM::useSiteTemplateWithPageFile()) { include($oscTemplate->getFile('template_bottom.php')); } } goto main_sub3; }

Is a DIRTY approach, ......... you should not COUNT on this code. it is unfinished code.

osc2nuke commented 6 years ago

Wake UP!!!!!!!!!!!

oitsuki commented 6 years ago

@osc2nuke It's nice to criticize, it's even better to share, this space is made for that. Because I do not see much from you! At work guy.

osc2nuke commented 6 years ago

Read the forum, it is Haralds words. He stated the code is unfinished , and it was necessary for the legacy modules. You will not going to see any work from me here anyway. I got notified by mail. Going to turn that of now.

oitsuki commented 6 years ago

I know all of that, You don't want to share the pb identified, it's your right, stop to be inside the team in this case. Also, you say : I am here for the Good of Osc, Bullshit.