Pesapal.com

Forum

Welcome, Guest
Username
Password:
 

Page is timing out when send data to Pesapal
(1 viewing) (1) Guest
Welcome to the Pesapal integration forum!

This forum discusses everything about Pesapal integration on your web site. Having any problems? This is the right place to post a question and we are sure you will get an answer
  • Page:
  • 1

TOPIC: Page is timing out when send data to Pesapal

Page is timing out when send data to Pesapal 13 years, 7 months ago #43

  • pattikay
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
hello,

When the form sends data to pesapal, the page times out. The data sent is below:



demo.pesapal.com/api/PostPesapalDirectOrderV4?item_reference=ad|3&oauth_callback=development.example.com/index.php?do=/ap...zj9&oauth_nonce={04AD7EF3-D129-4F09-6AA8-D2655DA76818}&oauth_signature=Bj/1uNlewfkQxxnnKTAxo7ycSGs=&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1346093557&oauth_version=1.0&pesapal_request_data=<?xml version="1.0" encoding="utf-8"?><PesapalDirectOrderInfo xmlns:xsi="www.w3.org/2001/XMLSchemainstance"x...2001/XMLSchema"
Amount="720" Description="Bottom Advertisement" Type="MERCHANT" Reference="ad|3" Email=" This e-mail address is being protected from spambots. You need JavaScript enabled to view it. " xmlns="www.pesapal.com" />&type=MERCHANT

Please help. I will appreciate any help I can get.

Thank you

Re: Page is timing out when send data to Pesapal 13 years, 7 months ago #44

  • lazro
  • OFFLINE
  • Administrator
  • Pesapal
  • Posts: 404
Hi pattikay,

Check in your pesapal-iframe code for a variable called iframelink. for demo merchants use HTTP and for the Actual merchant use HTTPS

Demo merchant:
$iframelink = 'demo.pesapal.com/api/PostPesapalDirectOrderV4';
Actual merchant:
$iframelink = 'www.pesapal.com/api/PostPesapalDirectOrderV4';

Note:
For the demo merchant
- we have the protocol as HTTP
- we have the domain as demo.pesapal.com

For the Actual merchant
- we have the protocol as HTTPS
- we have the domain as www.pesapal.com
Regards,

Lazaro Ong'ele
Web Developer

Skype: Lazrotep
+254-020-249-5438 ; +254-706-191-729
Dagoretti Lane, Off Naivasha Road.

Facebook: www.facebook.com/pesapal
Twitter: twitter.com/PesaPal
Helpdesk: support.pesapal.com
This e-mail address is being protected from spambots. You need JavaScript enabled to view it.
Last Edit: 13 years, 7 months ago by lazro.

Re: Page is timing out when send data to Pesapal 13 years, 7 months ago #45

  • pattikay
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
Thanks lazro, let me try and let you know how it goes. THANKS!

Re: Page is timing out when send data to Pesapal 13 years, 7 months ago #46

  • pattikay
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
Hello Lazro,

I have changed the link to point to http
I am now getting a signature invalid error, here is a sample of the code posted:

http://demo.pesapal.com/api/PostPesapalDirectOrderV4?item_reference=ad%7C3&oauth_callback=http%3A%2F%2Fdevelopment.example.com%2Findex.php%3Fdo%3D%2Fapi%2Fgateway%2Fcallback%2Fpesapal%2F&oauth_consumer_key=GO2eTgW%2B8vXZBCTvzX7kyDAtNWXa5zj9&oauth_nonce=%7B93737AB7-8826-565F-5EC4-F4632FA461D2%7D&oauth_signature=w65DsqIpmLAKZaDlxqAutQVY%2BOo%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1346153956&oauth_version=1.0&pesapal_request_data=%26lt%3B%3Fxml%20version%3D%26quot%3B1.0%26quot%3B%20encoding%3D%26quot%3Butf-8%26quot%3B%3F%26gt%3B%26lt%3BPesapalDirectOrderInfo%20xmlns%3Axsi%3D%26quot%3Bhttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchemainstance%26quot%3Bxmlns%3Axsd%3D%26quot%3Bhttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%26quot%3B%20%0AAmount%3D%26quot%3B720%26quot%3B%20Description%3D%26quot%3BBottom%20Advertisement%26quot%3B%20Type%3D%26quot%3BMERCHANT%26quot%3B%20Reference%3D%26quot%3Bad%7C3%26quot%3B%20Email%3D%26quot%3Badmin%40yahoo.com%26quot%3B%20xmlns%3D%26quot%3Bhttp%3A%2F%2Fwww.pesapal.com%26quot%3B%20%2F%26gt%3B&type=MERCHANT


I appreciate any help you can give.

Thank you.

Re: Page is timing out when send data to Pesapal 13 years, 7 months ago #47

  • lazro
  • OFFLINE
  • Administrator
  • Pesapal
  • Posts: 404
Hi pattikay,

Check that your consumer_key and consumer_secret are correct and belong to the correct merchant group, either a demo merchant or a real merchant. Incorrect value will throw this error.
Regards,

Lazaro Ong'ele
Web Developer

Skype: Lazrotep
+254-020-249-5438 ; +254-706-191-729
Dagoretti Lane, Off Naivasha Road.

Facebook: www.facebook.com/pesapal
Twitter: twitter.com/PesaPal
Helpdesk: support.pesapal.com
This e-mail address is being protected from spambots. You need JavaScript enabled to view it.

Re: Page is timing out when send data to Pesapal 13 years, 7 months ago #48

  • pattikay
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
Hello Lazro,

Thank you for your reply.

The consumer secret was correct. The problem seems to be with the XML being sent.

I am now getting the error:

Problem: parameter_rejected | Advice: unknown_error_occured> oauth_parameters_rejected | request_xml_data

I have tried two types of XML data passed, still getting the same error:

$post_xml = "<?xml version="1.0" encoding="utf-8"?><pesapaldirectorderinfo >_aParam['amount'],2)*90)."" Description="".$this->_aParam['item_name']."" Type="".$this->_type."" Reference="".$this->_aParam['item_number']."" FirstName="".App::getUserBy('full_name')."" LastName=" "."" Email="".App::getUserBy('email')."" PhoneNumber=" ". "" xmlns="http://www.pesapal.com" />";
$post_xml = htmlentities($post_xml);


and I have tried:

$post_xml = '<!--?xml version="1.0" encoding="utf-8" ?-->
<pesapaldirectorderinfo >_aParam['amount'],2)*90) .'" description="'.$this->_aParam['item_name'].'" type="'.$this->_type.'" reference="'.$this->_aParam['item_number'].'" firstname="'.Phpfox::getUserBy('full_name').'" lastname=" " email="'.Phpfox::getUserBy('email').'" xmlns="www.pesapal.com"></pesapaldirectorderinfo>';
$post_xml = htmlentities($post_xml);


The data being sent is:

http://demo.pesapal.com/api/PostPesapalDirectOrderV4?oauth_callback=http%3A%2F%2Fdevelopment.example.com%2Findex.php%3Fdo%3D%2Fapi%2Fgateway%2Fcallback%2Fpesapal%2F&oauth_consumer_key=GO2eTgW%2B8vXZBCTvzX7kyDAtNWXa5zj9&oauth_nonce=%7B5EF708AD-EC53-AC43-4C04-C9C047591391%7D&oauth_signature=cF%2Fu6Dd3ZKYVQIH1423%2Fbq8JXB8%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1346164427&oauth_version=1.0&pesapal_request_data=%26lt%3B%21--%3Fxml%20version%3D%26quot%3B1.0%26quot%3B%20encoding%3D%26quot%3Butf-8%26quot%3B%20%3F--%26gt%3B%0A%20%20%20%26lt%3Bpesapaldirectorderinfo%20xmlns%3Axsi%3D%26quot%3Bhttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance%26quot%3B%20xmlns%3Axsd%3D%26quot%3Bhttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%26quot%3B%20%0Aamount%3D%26quot%3B720%26quot%3B%20description%3D%26quot%3BBottom%20Advertisement%26quot%3B%20type%3D%26quot%3BMERCHANT%26quot%3B%20reference%3D%26quot%3Bad%7C3%26quot%3B%20firstname%3D%26quot%3Bjaned%26quot%3B%20lastname%3D%26quot%3B%20%26quot%3B%20email%3D%26quot%3Badmin%40yahoo.com%26quot%3B%20xmlns%3D%26quot%3Bhttp%3A%2F%2Fwww.pesapal.com%26quot%3B%26gt%3B%26lt%3B%2Fpesapaldirectorderinfo%26gt%3B



I really appreciate all your help.
Thanks.
Last Edit: 13 years, 7 months ago by pattikay. Reason: wrong tag

Re: Page is timing out when send data to Pesapal 13 years, 7 months ago #49

  • lazro
  • OFFLINE
  • Administrator
  • Pesapal
  • Posts: 404
Hi,
You are welcome.I have had a look at both XMLs and they have incorrect opening and closing tags. This is the source of the error since it breaks up the data format expected on our servers.

Below is the expected format:
$post_xml = '<?xml version="1.0" encoding="utf-8"?><PesapalDirectOrderInfo xmlns:xsi="www.w3.org/2001/XMLSchema-instance" xmlns:xsd="www.w3.org/2001/XMLSchema" Currency="'.$currency.'" Amount="'.$amount.'" Description="'.$desc.'" Type="'.$type.'" Reference="'.$reference.'" FirstName="'.$first_name.'" LastName="'.$last_name.'" Email="'.$email.'" PhoneNumber="'.$phonenumber.'" xmlns="www.pesapal.com" />';

Have it as one continuous sentence without page breaks.
Regards,

Lazaro Ong'ele
Web Developer

Skype: Lazrotep
+254-020-249-5438 ; +254-706-191-729
Dagoretti Lane, Off Naivasha Road.

Facebook: www.facebook.com/pesapal
Twitter: twitter.com/PesaPal
Helpdesk: support.pesapal.com
This e-mail address is being protected from spambots. You need JavaScript enabled to view it.

Re: Page is timing out when send data to Pesapal 13 years, 7 months ago #50

  • pattikay
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
Thanks Lazro.

Let me try and give you feedback.

Thanks.

Re: Page is timing out when send data to Pesapal 13 years, 6 months ago #62

Hi pattikay,

A little check on your XML format tells me you are mixing qoutes. open with double qoutes and make sure any other qoute in between the double is single. Your problem is due to malformed xml.There is no problem with breaks.

$post_xml ='<?xml version="1.0" encoding="utf-8" ?>
<PesapalDirectOrderInfo
>amount; ?>"
Description="<?php echo $this->description; ?>"
Currency="<?php echo $this->currency; ?>"
Type="<?php echo $this->type; ?>"
PaymentMethod="<?php echo $this->method; ?>"
Reference="<?php echo $this->reference; ?>"
FirstName="<?php echo $this->firstname; ?>"
LastName="<?php echo $this->lastname; ?>"
Email="<?php echo $this->email; ?>"
PhoneNumber="<?php echo $this->phone; ?>"
UserName="<?php echo $this->username; ?>"
xmlns="http://www.pesapal.com" >
<?php echo $this->lineitems; ?>
 
</PesapalDirectOrderInfo>';
$post_xml = htmlentities($post_xml);


you can try with this replace php code with appropriate templating engine you are using

Re: Page is timing out when send data to Pesapal 13 years, 6 months ago #63

Oops i think someelements are being replaced by bbcode.
$post_xml ='<?xml version="1.0" encoding="utf-8" ?>
<PesapalDirectOrderInfo
>amount; ?>"
Description="<?php echo $this->description; ?>"
Currency="<?php echo $this->currency; ?>"
Type="<?php echo $this->type; ?>"
PaymentMethod="<?php echo $this->method; ?>"
Reference="<?php echo $this->reference; ?>"
FirstName="<?php echo $this->firstname; ?>"
LastName="<?php echo $this->lastname; ?>"
Email="<?php echo $this->email; ?>"
PhoneNumber="<?php echo $this->phone; ?>"
UserName="<?php echo $this->username; ?>"
xmlns="www.pesapal.com" >
<?php echo $this->lineitems; ?>

</PesapalDirectOrderInfo>';
$post_xml = htmlentities($post_xml);
webtrendzs wrote:
Hi pattikay,

A little check on your XML format tells me you are mixing qoutes. open with double qoutes and make sure any other qoute in between the double is single. Your problem is due to malformed xml.There is no problem with breaks.

$post_xml ='<?xml version="1.0" encoding="utf-8" ?>
<PesapalDirectOrderInfo
>amount; ?>"
Description="<?php echo $this->description; ?>"
Currency="<?php echo $this->currency; ?>"
Type="<?php echo $this->type; ?>"
PaymentMethod="<?php echo $this->method; ?>"
Reference="<?php echo $this->reference; ?>"
FirstName="<?php echo $this->firstname; ?>"
LastName="<?php echo $this->lastname; ?>"
Email="<?php echo $this->email; ?>"
PhoneNumber="<?php echo $this->phone; ?>"
UserName="<?php echo $this->username; ?>"
xmlns="http://www.pesapal.com" >
<?php echo $this->lineitems; ?>
 
</PesapalDirectOrderInfo>';
$post_xml = htmlentities($post_xml);


you can try with this replace php code with appropriate templating engine you are using

Re: Page is timing out when send data to Pesapal 12 years, 11 months ago #320

Problem: parameter_rejected | Advice: unknown_error_occured>
oauth_parameters_rejected | request_xml_data

how do i fix this error? i have removed the spaces but still same error.

Re: Page is timing out when send data to Pesapal 12 years, 10 months ago #368

I also have the same error and my key and secret are on demo values while the $iframelink has the demo.pesapal.com

Did you solve your problem?
Thanks in advance..

Re: Page is timing out when send data to Pesapal 12 years, 10 months ago #406

I'm having this same problem - did you ever resolve it?
  • Page:
  • 1