Jump to content

Marco Ro

Members
  • Posts

    347
  • Joined

  • Last visited

Everything posted by Marco Ro

  1. thank you @BrendonKoz In the end I fixed by changing the server provider. I can't make change in the php ini in OVH. so, just fixed by go back to site ground.
  2. Could be my script non be configured well for my server? http://iovfspa.cluster031.hosting.ovh.net/phpinfo.php
  3. @flydev @BrendonKoz sorry, maybe I didn't understand what you tell me. Look like server side is all good, the port 443 is open. But I still to not understand way I can't get the answer from the call. You say that HTTPS is forbidden. But have I to configure Processwire to use HTTP for this call ? I can't understand where is the problem, I have this call, that start from playwood.it and go to https://auth.giobby.com/auth/... I just test with Postman and works, test with other server and other CMS and works, in my past Processwire website works but was a old PW version and other server. $auth = array( "grant_type" => 'password', "client_id" => 'PLA591WOD-playwoodsrl', "username" => 'demo-dev', "cid" => 'playwoodsrl', "password" => 'DemoPassword' ); $dati = ''; foreach ($auth as $k => $v) { $dati .= $k . '=' . urlencode($v) . '&'; } rtrim($dati, '&'); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://auth.giobby.com/auth/realms/api-server/protocol/openid-connect/token'); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_TIMEOUT, 30); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_POSTFIELDS, $dati); $result = curl_exec($ch); $error = curl_error($ch); curl_close($ch); $result_obj = json_decode($result); $tokenGiobby = $result_obj->access_token;
  4. Problem is not on the auth.giobby.com side. The problem is in my server, where is store the e-commerce www.playwood.it I need response with the access token and not arrive because my port is close. (I think) I just change the provider from siteground to OVH, add look like the OVH with my current plane not give me the ability to setup the ports. I try to deleted the firewall but probably OVH have some security setup that not open the door by default.
  5. Yes is this, but I have a different plan, so I can't for my self open the port 443
  6. Thank you for your help! I'm quite sure that problem is in the server, because I just try with another server provider (chipper one) and everything works well. How could I check if is the server ?
  7. Yes I think is this!! OVH 😤 How can I unblock the port? I have written to the assistance, but they are really slowly!
  8. Hello everyone, there is something blocking the responses of POST and GET calls. I don't know what to do, the call tried on postman works. And also from a site with an older version of ProcessWire. I can't figure out what it is that's blocking the response. All I get is this error: `Failed to connect to auth.giobby.com port 443: Connection timed out` What I can do?
  9. Can I come and kiss you??? Thank you! Was this little things now all works well. Didn't know why before I have the function __() problem, maybe something got broken during the installation process, but weird. Anyway Thank you again
  10. I try to direct upload the folder site and wire to the host, and changing the config for the server. Now I don't see anymore that error, but, the homepage is the only page works 😓 all other URL are Not Found. So, keep tring to fix new bug.
  11. Thank you @BitPoet I already try to clear the cache in site/assets/cache, and also in the db. It is the first time I see this error and I don't know if it could be something about the server, but I guess OVH it's ok, all the setup look good. The same installation on Mamp works well. At moment, I try to install the site-languages-main, but I think the last PW version has already that inside, so, I'm not sure if this will work. If not work I will try again by copy post the local installation. I don't have any other idea
  12. Hello everyone, I haven't posted here for a long time! I hope everything is going well. I had a problem migrating a site, I uploaded a site to an OVH server (I don't know if it's related), I have this error: `Call to undefined function __()` I can't figure out how I can solve it, not always be related to the installation. I have tried both MySQL 5.7 and 8, PHP7.4 and PHP8. But no combination solves the problem. Do you know what I can do? Thank you
  13. Hi, I created a new installation and tried to use the module, only it doesn't work for me if I put the field ImageReference inside the Repeater. Do I have to do anything to activate it? ty
  14. Interesting I see that is a really minimal code, but what we needed was different. The PayPal Platform Commerce version let you pay using card without any PayPal account. So, PayPal works like Stripe, he make a connection with the customer's back account and make the 3d security check, so user don't pay using PayPal but with a tool of PayPal. (this also have a less fee than Stripe). Other nice thing of this version, like the old one, it integrate the local payment method like bank transfert. Also, here in Italy is not ready yet, but in the future will be possible have the payments in installments for customer, where PayPal pay all the amount to you but the customer can split into a maximum of 3/4 installments.
  15. Hi @Hackasacka, thank you for share. This is interesting, but what I needed was a server side operation, because the PayPal Platform Commerce version active more PayPal features, like card payment for no PayPal account. In the end I finish the module, is a bit row respect all the ProcessWire Module because it is my first module, but works well. I use it form 1 moth without problems. You can find it here: or here: https://github.com/MarcooRo/processwire-PayPal-Commerce-Platform
  16. Hi guys! I'm a bit anxious because this is the first module I present! (beta modulo) But I will finally be able to share something with the community too! :) This is a BETA version of the PayPal payment system called: PayPal Commerce Platform. It is an advanced system (Business Pro account is needed) that brings various benefits in terms of fees and above all integrates direct payment with credit/debit cards. The module integrates with Padloper 0.0.2, which is the current installation I'm using. This system integrates the classic PayPal buy button, the alternative or local payment method and the new payment system: credit/debit cards that doesn't go through the PayPal account. It is a Stripe-style payment, it connects directly with the bank and integrates 3D security validation. I say that it is a BETA because this module currently only works with Sandbox account, to put it live you need to change API url manually (manually for the moment). Because this module is not ready for live: I would like to have your opinion on how I built the module (is the first one I do). I don't want to share something that is not fish but I need a comparison with someone more experienced than me, for be sure that this is the best way to code the module. If you want to try this I created a git, you will find all the instructions for installation and correct operation. (Git has a MIT licensed) https://github.com/MarcooRo/processwire-PayPal-Commerce-Platform I hope I did something that you guys can like :) UPDATE I have been testing the form for several days and everything is working fine. Each order enters correctly, so I have updated the repo with the latest changes and I can confirm that this version is ready for live! I have updated the repo: Added error message + popup Fixed some bugs related to multilingual Updated the switch for checking the responses of the 3D security system
  17. Hi @kongondo, I have definitely taken some steps forward! I'm able to do the server-side transaction with card. The problem was that we have the site in multilingual I had to add the language path. In this way I can make the call and a credit card transaction is done correctly. Now the problem, which I don't know if it can be solved, is the answer call. I see the response because I prints this in the capture-order page. However, the response in the confirmation page is not sent to me from the server. So, I do this: From checkout/confirmation/ --> fetch a request to process payment to capture-order.php (that is a page in site/templates with a url) --> Then I need an answer in checkout/confirmation/ to finish the process. But this not arrive, could be because ProcessWire blocks the call back ? Is there a way to get the answer for this call? If you want I can share my code. It works but is ugly.
  18. UPDATE Hi @kongondo So, I'm close to find a solution and make the Module works. But I need some help to the last steps. For let the modules works I have to create a template with a PHP file in site/templates that includes the external library. This way I can send the data and get the answer. I just don't understand why the call landing page gives me error 301 and all values are NULL or empty arrays I fetch the data form the Confermation page in this way const data = { id: payload.orderId }; return fetch('".$capture."', { // this is in /site/templates/capture-order.php which has its own url method: 'post', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json', }, body: JSON.stringify(data) }) .then(function(res) { return res.json(); }).then(function(data) { console.log('data->' , data); alert('ok'); return data.id; }); I try to receive data in these ways, but not one works $json = file_get_contents('php://input'); var_dump($json); $orderid = $json; var_dump($orderid); $data = json_decode($json); var_dump($data->id); $data['id']; var_dump($data['id']); Now I can't understand if the problem is on the error 301 or in the way i get the JSON. I test the url and there isn't redirect.
  19. Hi @kongondo, thank you for your help. You're right, let me explain: I'm currently developing a PayPal payment module. After a call with one of their sales representatives, he told me that PayPal is drastically lowering the fees for card transactions outside of PayPal account, and that it will implement various implementations in the future, such as recurring payments, crypto wallets, etc. All this will be possible with the use of PayPal Commercial Platform Serve-side. So I'm getting to work on creating the module. I use Padloper 0.0.2, I was able to render correctly the form inside the Confirmation page. After that I have to send a CRUL call to the PayPal server to generate an ID order, that needed to make the payment (with another call). So, from the Confirmation page I rendere the script, the forms and create a JSON with all information about the transaction, this must been send to a page that executes a CRUL call to PayPal's Server. Being serve side, I can't do it from the Confirmation page because the page has already been rendered and also because the call starts when the payment button is clicked. So, I have a second page inside the module that handles this call and returns the PayPal order ID. But I can't make this call. I'm stack here. Kindly, the technical assistance of PayPal has provided me with a PHP demo working example of the whole operation. If you or some one are interested let me share this code, I'm attaching the file here. From this demo I started creating the module. I also attaching here, how far I have arrived: The module installs correctly, with some fields for contents, you can add the paid system with the Padloder module, the forms render correctly in Confermation Page and JSON is compiled correctly. Form Paypal to make calls, you need a Sandbox account set up as a PayPal Business PRO. ( not just PayPal Business ). EDIT I deleted the module because it makes no sense to keep around something that doesn't work. I'm think to be close so I will post finished version later demoPPCPadv3DSEC.zip
  20. Hello all, is it possible to fetch to a php page inside a Modules folder? I need to perform a server-side operation, I have to fetch a json to this php page and do a crul to generate an ID on the external platform (and then pass this ID into another API call). But I get error 403 when I try to fetch data to the file inside modules. What I can do? thank you
  21. Thanks for your hard work, I can only imagine how complex it is to build a system like this.
  22. Hi there, the idea of this module was born from the need to integrate FB API to bypass the block of reading data after the IOS14 update. FB tells us that in order to continue reading the data we have to send it via the API Convention. I wanted to publish this module finished, but I can't figure out how to do this. :( I don't know if anyone is willing to help me understand how to solve my problems. I'm trying to create a module with the Facebook SDK to send info via API. I attach here what I have done, at the moment, it is all very simple and rough. facebookSDK.zip At the moment the module works only as a link to the SDK folder and can be used to enter the credentials of the token and pixal via two variables. What I would like to do is to leave all the request to the SDK, in order to keep only the creation of objects in the page. Since the use cases are so many, I thought the best solution is to delegate to the module the connection with the SDK and keep in the page the creation of objects to be customized. Basically for the Convention API you need to make these objects UserData CustomData Event For let this module works fine, at moment, I have to add in to the page also the call to the SDK. So, in my page I have $fbSDK = $modules->get('facebookSDK'); use FacebookAds\Api; use FacebookAds\Logger\CurlLogger; use FacebookAds\Object\ServerSide\Content; use FacebookAds\Object\ServerSide\CustomData; use FacebookAds\Object\ServerSide\DeliveryCategory; use FacebookAds\Object\ServerSide\Event; use FacebookAds\Object\ServerSide\EventRequest; use FacebookAds\Object\ServerSide\Gender; use FacebookAds\Object\ServerSide\UserData; // Configuration this all $time = time(); if (isset($_COOKIE['_fbc'])) {$fb_fbc = $_COOKIE['_fbc'];} // This data is always better to have if (isset($_COOKIE['_fbp'])) {$fb_fbp = $_COOKIE['_fbp'];} // This data is always better to have $access_token = $fbSDK->accessToken(); $pixel_id = $fbSDK->pixelId(); // Initialize Api::init(null, null, $access_token); $api = Api::instance(); $api->setLogger(new CurlLogger()); $events = array(); // Specific data only if need in the object $hashEmail = hash('sha256', $user->email); // some data need to be hashed with SHA256 and UTF-8 encoding $user_data_0 = (new UserData()) ->setEmail($hashEmail) ->setClientIpAddress($_SERVER['REMOTE_ADDR']) ->setClientUserAgent($_SERVER['HTTP_USER_AGENT']) ->setFbc($fb_fbc) ->setFbp($fb_fbp); $custom_data_0 = (new CustomData()) // all these data are optional, I only include them as an example ->setValue(str_replace(",", ".", $page->pad_price)) ->setCurrency("EUR") ->setContentName("API test") ->setContentIds($skuAPI_json) ->setContentType("product_group") ->setCustomProperties(array("product_catalog_id" => "111111111")); $event_0 = (new Event()) ->setEventName("ViewContent") ->setEventTime($time) ->setUserData($user_data_0) ->setCustomData($custom_data_0) ->setActionSource("website") ->setEventSourceUrl($page->url(true)); array_push($events, $event_0); $request = (new EventRequest($pixel_id)) ->setEvents($events); $request->execute(); I would like to bring all this part into the module: use FacebookAds\Api; use FacebookAds\Logger\CurlLogger; use FacebookAds\Object\ServerSide\Content; use FacebookAds\Object\ServerSide\CustomData; use FacebookAds\Object\ServerSide\DeliveryCategory; use FacebookAds\Object\ServerSide\Event; use FacebookAds\Object\ServerSide\EventRequest; use FacebookAds\Object\ServerSide\Gender; use FacebookAds\Object\ServerSide\UserData; // Configuration. if (isset($_COOKIE['_fbc'])) {$fb_fbc = $_COOKIE['_fbc'];} if (isset($_COOKIE['_fbp'])) {$fb_fbp = $_COOKIE['_fbp'];} $access_token = $fbSDK->accessToken(); $pixel_id = $fbSDK->pixelId(); // Initialize Api::init(null, null, $access_token); $api = Api::instance(); $api->setLogger(new CurlLogger()); While keeping everything else on the page, so that it is customizable according to the needs of the moment.
  23. Hi @Marvin, could I ask you if please share the function? I am trying to do a similar thing, but I am stuck at this point!
  24. Hi, after the update from the 3.0.123 to the 3.0.164 I have some problem: The website start to be really slow and the server often go in times out with error 500. The different in performance was about 5/6s of TTFB. I try a lot of different things to recover speed and no longer have the error. In the end we went back to the previous version and everything worked better. On the 3.0.164 version I notice this error that maybe they can help to understand the reason for the problem with the update: Analyzing the site with the help of the server provider we found that: the index page make a lot of executions, was 38737 in 1 day. This is to very much for the traffic that we have, in the same day our IP is run 23206 call, that look impossible. I'm not sure the problem is about those things, I also the server use nginx, maybe could be this. At moment we will keep using the 3.0.123 version, but I would like to make the upgrade to use the new API. Someone can help me to understand why the site has become slow? UPDATE I tried to load version 3.0.148, but still I notice a slowdown of the site. The TTFB grow from 2.8 to 6.3 Someone know if there is a way to use the webp format for version 3.0.123 as well?
  25. Me too was looking to Digital Ocean's, is so interesting service. But I didn't experience and It seems a bit complex to use. I did not know Hetzner's, it is very interesting the MX93-HDD plan would be what we need even if it is a bit more expensive than what we pay now which is 79€ Thank you so much, I will take them into consideration.
×
×
  • Create New...