As a starting point I would look at a setting up Docker support on your own 
server and download an official PHP container image from here:
https://hub.docker.com/_/php

Once configured (which often involves some pain unfortuantely!) then you can 
call the PHP container with your PHP file - there is an example on that web 
page above. This is a much simplified summary and there will some further 
details to work out. From my own experience I have previously architected a 
Docker microservices platform that integrated several discrete PHP containers 
each providing a discrete service (catalogue, payments, order processing, etc) 
with their own DB back-ends (MySQL or NoSQL such as MongoDB) and it worked well.

From 4D , and this is a bit theoretical on my part as I have no first hand 
implementation experience of it, but I would then call the container via 
command line as per Dani's suggestion.

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
-- 

-----Original Message-----
From: Sam Burnell <[email protected]>
Date: Wednesday, 4 September 2019 at 01:25
To: 4D Tech Mailing List <[email protected]>
Cc: Narinder Chandi <[email protected]>, Dani Beaubien 
<[email protected]>
Subject: Paypal IPN Integration

    Thank you for the response, Narinda.
    
    Any suggestions on where I would find that binary, and also how I would 
then get a php file (with cURL functions) to execute from inside the listener 
(OWC) without using PHP Execute?
    
    In other words, how to bypass using 4D’s php interpreter and use the one 
exterior to 4D?
    
    Thanks again,
    
    Sam
    
    
    
    > On Sep 3, 2019, at 5:14 PM, Narinder Chandi via 4D_Tech 
<[email protected]> wrote:
    > 
    > Sam,
    > 
    > I don't think Dani was suggesting that you build your own PHP interpreter 
(although it's not hard to compile it from source for custom needs). If I 
understood him correctly he was merely hinting at the option to download a 
prebuilt binary with cURL support baked in, for example.
    > 
    > Regards,
    > 
    > Narinder Chandi,
    > ToolBox Systems Ltd.
    > -- 
    > 
    > -----Original Message-----
    > From: 4D_Tech <[email protected]> on behalf of 4D Tech Mailing 
List <[email protected]>
    > Reply-To: 4D Tech Mailing List <[email protected]>
    > Date: Wednesday, 4 September 2019 at 01:09
    > To: Dani Beaubien <[email protected]>
    > Cc: Sam Burnell <[email protected]>, 4D Tech Mailing List 
<[email protected]>
    > Subject: Re: Please post this!
    > 
    >    Hi Dani,
    > 
    >    Thanks for the response.
    > 
    >    I don’t know nearly enough about php to be able to build my own 
interpreter. I think I’m going in a different direction than php.
    > 
    >    Thank you again,
    > 
    >    Sam
    > 
    >> On Sep 3, 2019, at 4:06 PM, Dani Beaubien 
<[email protected]> wrote:
    >> 
    >> Hi Sam, you don’t have to use 4D’s PHP. You can install your own version 
of the PHP interpreter and call that through the command line. I had to do that 
due to having a requirement of a specific version of PHP. Works quite well.
    >> 
    >> Dani Beaubien
    >> Open Road Development
    >> 
    >> 
    >>> On Aug 28, 2019, at 10:43 PM, Sam Burnell via 4D_Tech 
<[email protected] <mailto:[email protected]>> wrote:
    >>> 
    >>> Hi,
    >>> 
    >>> I am looking for a solution to taking paypal payments on our website 
(which is served by a 4D Server database), which utilizes paypal's Instant 
Payment Notification (IPN) system.
    >>> 
    >>> To clarify, our system is already set up to take paypal payments but we 
get no notification from paypal that a payment was made. The only way we know 
that we received a payment is when we see the payment in our paypal account. We 
then have to manually create the necessary database records for the 
transaction, based on the payment. 
    >>> 
    >>> So we need paypal to notify us when a successful payment is received by 
them so that we can automate the process (as we do with credit cards).
    >>> 
    >>> Here is what we want to do:
    >>> 
    >>> Upon receiving a payment for our product, paypal will send an IPN 
(containing transation data) to a url specified by us, where we have a listener 
set up (in OWC) to intercept that notification and execute a file which 
receives the data, returns it to paypal, and then receives either a VERIFIED or 
INVALID response from paypal. If VERIFIED, we use the transaction data to 
auto-generate the required records in our database.
    >>> 
    >>> The file I just mentioned can be written in php, js, coldfusion, perl, 
ruby, etc. Paypal provides examples for each language on github.
    >>> 
    >>> So, I tried for weeks to implement the php version, only to find out 
(through partner support) that 4D's php interpreter is not set up to handle 
cURL functions, which are part of the php code in paypal's php sample...
    >>> 
    >>> So now I'm trying to work with javascript and not having much success 
(although more than with php) and I thought I'd put some feelers out there... 
Seems to me as though there has to be a commercial 4D website/database (or 
two!) out there that sells products online and takes paypal payments using 
paypal's IPN. If that is the case, I'm willing to PAY for time, advice, code, 
etc., so PLEASE contact me if you think you can assist, and thanks in advance.
    >>> 
    >>> Sam
    >>> **********************************************************************
    >>> 4D Internet Users Group (4D iNUG)
    >>> Archive:  http://lists.4d.com/archives.html 
<http://lists.4d.com/archives.html>
    >>> Options: https://lists.4d.com/mailman/options/4d_tech 
<https://lists.4d.com/mailman/options/4d_tech>
    >>> Unsub:  mailto:[email protected] 
<mailto:[email protected]>
    >>> **********************************************************************
    >> 
    > 
    >    **********************************************************************
    >    4D Internet Users Group (4D iNUG)
    >    Archive:  http://lists.4d.com/archives.html
    >    Options: https://lists.4d.com/mailman/options/4d_tech
    >    Unsub:  mailto:[email protected]
    >    **********************************************************************
    > 
    > 
    > **********************************************************************
    > 4D Internet Users Group (4D iNUG)
    > Archive:  http://lists.4d.com/archives.html
    > Options: https://lists.4d.com/mailman/options/4d_tech
    > Unsub:  mailto:[email protected]
    > **********************************************************************
    
    


**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to