Jump to content

Recommended Posts

Hi to all,

 

I am trying to get following result for my site and I have created a script for it but half script is working and half is not working.

 

1) My Credit Card merchant send a POST request to one of my site's page. For example lets take my site name mysite1.com so they send POST request to this site.

2) I created a CURL script to send POST request to my another site (i.e. mysite2.com), on a page where my Credit Card Merchant send a request.

3) Then on mysite2.com, I create script to update database records of mysite2.com and send emails to both administrator and customer.

Summary of above is as:

Credit Card Merchant Send POST request to mysite1.com >> mysite1.com send CURL POST request to mysite2.com >> mysite2.com updates database records and send emails.

 

Now problem is here that both customer and administrator is receiving emails but database records got not updated, I thought that there may be a problem in query (like some special character) so I created a backup table and tried to insert that query in the backup table but now I see that on another order, not a backup table have any record and not a order table have any record updated.

 

I do not figure out what exactly the problem is.

 

 

I use following code on mysite1.com

<?php
extract($_POST);

if($transactionType=="something") {
  $URL="http://www.mysite2.com/receive.php";
  $ch = curl_init();
  $POST = "fname=$firstName&lname=$lastName&amount=$invoiceChargeAmount&orderid=$orderId&email=$email";
  curl_setopt($ch, CURLOPT_URL,"$URL");
  curl_setopt($ch, CURLOPT_POST, 1);
  curl_setopt($ch, CURLOPT_POSTFIELDS, $POST);
  $result = curl_exec($ch);
  curl_close ($ch);
}

?>

 

 

I am very thankful in advance to those who can help. Waiting for serious responses.

 

Thanks

Sweetguyzzz

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.