Jump to content

Marco Ro

Members
  • Posts

    335
  • Joined

  • Last visited

Everything posted by Marco Ro

  1. 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
  2. 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.
  3. 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
  4. 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
  5. 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.
  6. 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.
  7. 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
  8. 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
  9. Thanks for your hard work, I can only imagine how complex it is to build a system like this.
  10. 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.
  11. 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!
  12. 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?
  13. 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.
  14. Yes sure @netcarver, managed possible with include not less than 4CPU and 8G Ram, and that can carry a heavy load of PHP processes. Our site is a bit heavy I'm trying to move some client side processes and also changing the markup by putting less php rendering and more html, but the website still heavy.I just add proCache but on some pages the server response times remain long. Thank you @rick, I know ovh. I only used it once, it seems like a good service, but I did have problems with customer support and one time the server broken down bad for hours. I built this site on it: medipet.it, it is a Processwire + Padloaper. It's over a year old and I don't think it has ever had any maintenance, but it still good.
  15. Hi everyone, Do you have a Hosting that uses Apache in Europe to recommend? At the moment I'm using Sitegroud the Cloud hosting version 3CPU 4G di RAM, but I don't like it, they have made updates and it always gives me problems. Also, they use NGINX and I seem to understand that it doesn't combine well with Processwire
  16. @PWaddict I know not everyone has this problem. Me too for a long time all works without problems, but after I get this error the only thing that worked was to disable css
  17. Hi, maybe it can be useful to someone. I had a problem with the sitemap generated because Google, or a check tools, tell me that the page was an HTML code. And if I inspect the page it is actually encoded as an html page. Inside the backend setting I have decheck the checkbox about the CSS, the one ask "Add a stylesheet to the sitemap". And this fix the problem. Now the page are render correctly. With tags: url, loc, xhtmal, image and so on... Now works so well!
  18. Hi @nbcommunication, I like a lot your project and thank you for sharing your experience. Could I ask you few questions? I really like your map, I haven't been able to figure out what you used to create the map! what did you use? Why you use Google Analytics and also Matomo? Shouldn't Matomo replace what analytics does? Thanks!
  19. Really an impressive job! Except that in this preview I have already seen everything an e-commerce needs, and even more. Can't wait to see how the APIs work!! This year we already had in mind to redo the site, it could be the kick in the ass we needed!
  20. Hi, There is a way to use an antispam system instead of using the opt-in or reCAPTCHA ?
  21. Hi @daniels, Yes, the subscribe method works very well. I have just tried and all the fields are correctly updated. Thank you for your module, this really speeds up my work.
  22. Hi, I have not clear how to update a user information. Is it possible? Ok super easy! Just use $subscriber method! Wow thank you, this really speeds up my work!
  23. Hi @Mike Rockett, First thank you for your modulo. I notice this error on the Search Console: The sitemap can be read, but it has errors. The sitemap is in HTML format It appears that your sitemap is an HTML page. Use a supported sitemap format. Examples Row 1 Tag: html At the moment it doesn't load me any links in the search console. What can I do?
  24. Thank you @Robin S, now work well. Thanks 🙂 I copy here some part of the documentation, if someone need:
  25. Hi everybody, I have to change the price of some products based on the type of role the user has, if he is logged in. For do this I use a module, I can change the price based of any fields in the products page but when I try to access to $user data give me an error, like this: isLoggedin() on a non-object or if I use $user->hasRole I give the same error hasRole on a non-object. I think the problem is that the module can't know which user is logged in, but I can't find a solution. Can someone help me to understand how I can access to this data to change the price? Thank you
×
×
  • Create New...