The rule is simple. VFP can do anything !!!
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Mike McCann Sent: Friday, 27 October 2017 7:59 AM To: profoxtech@leafe.com Subject: RE: VFP, Authorize.net
We have used Rick Strahl's West-Wind Web Tools for years to do HTTP POST using HTTP and HTTPS, both to web sites and web services. We call an in-house written C# Windows authentication utility from VFP. A little work but very do-able from VFP.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Stephen Russell Sent: Thursday, October 26, 2017 3:33 PM To: profoxtech@leafe.com Subject: Re: VFP, Authorize.net
I will say yes and no. Getting the data, collections in this case, from VFP to post there may be difficult. you are posting in an httppost situation.
From a PHP pov there are objects being created. new
AnetAPI\TransactionRequestType(); you should be able to do that easily. You then stuff it. Still easy. It is the defining the catching object to receive the response. That is where I think you are going to find the difficulty.
// Create a TransactionRequestType object and add the previous objects to it $transactionRequestType = new AnetAPI\TransactionRequestType(); $transactionRequestType->setTransactionType("authCaptureTransaction"); $transactionRequestType->setAmount($amount); $transactionRequestType->setOrder($order); $transactionRequestType->setPayment($paymentOne); $transactionRequestType->setBillTo($customerAddress); $transactionRequestType->setCustomer($customerData);
$transactionRequestType->addToTransactionSettings($duplicateWindowSetting); $transactionRequestType->addToUserFields($merchantDefinedField1); $transactionRequestType->addToUserFields($merchantDefinedField2);
// Assemble the complete transaction request $request = new AnetAPI\CreateTransactionRequest(); $request->setMerchantAuthentication($merchantAuthentication); $request->setRefId($refId); $request->setTransactionRequest($transactionRequestType);
// Create the controller and get the response $controller = new AnetController\CreateTransactionController($request); $response = $controller->executeWithApiResponse(\net\authorize\api\constants\ANetEnvironment::SANDBOX);
if ($response != null) { // Check to see if the API request was successfully received and acted upon if ($response->getMessages()->getResultCode() == \SampleCode\Constants::RESPONSE_OK) { // Since the API request was successful, l
On Thu, Oct 26, 2017 at 2:42 PM, Vince Teachout teachv@taconic.net wrote:
A friend of mine sent the following question, and I don't know the answer. Does anyone know off the top of their head?
"I have a VFP question if you do not mind. I have a client with an old custom app in VFP 7 and 9. They process credit cards using Authorize.net. Authorize.net is pushing everyone to a new API and I am tasked with migrating the client’s apps so they can use this new API ( https://developer.authorize.net/api/reference/index.html). Currently they use HTTP Posts to send in the CC info.
Anyway, my question is this. Authorize offers a development kit and example code using C#. Therefore it should be .Net compliant and wouldn’t that mean I could use the same in a VFP application?"
[excessive quoting removed by server]