Bitcoin Forum
November 11, 2024, 04:32:45 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: SCI MyBitcoin Curl Failure !  (Read 780 times)
nod (OP)
Full Member
***
Offline Offline

Activity: 126
Merit: 100



View Profile
June 14, 2011, 08:26:46 PM
 #1

Hi,
i've got a problem with MyBitcoin SCI, i'm developing a bitcoin based website and i want to use Mybitcoin to manage my payments.
I can't get the Transaction Number, Transaction Amount, Payer..., i just get "Curl Failure !" in $response['SCI Code'].
I thought it was a problem with my hosting but no -> cURL is enabled and i've tested on others hostings.

I just want to check that my visitor has been sent the BTCs, i tried with cookies but if the visitor find the success url, he can cheat.

What to do ?
Thanks
hamburger
Full Member
***
Offline Offline

Activity: 241
Merit: 107



View Profile WWW
July 11, 2011, 08:16:08 AM
 #2

Hi,

You can still make use of cookies to track the user - even if they know what the success url is, it's just annoying if they try to break it by brute force.

This is what you do;

Compile a string with all the variables that you need to submit and what you require to process your transaction;

$my_querystring="
amount=1&
currency=USD&
payee_bcaddr=1AvN36TvnWxkUYYBRckpRxyFcys5Z28bSB&
payee_name=My Name&
success_url=https://www.my_domain.com/success.php&
cancel_url=https//www.my_domain.com/cancel.php&
baggage=
cookie_used=whatever_value&
anotherfield=another_value&
add_more=ifyouwant&
yougetthepicture=yes
";

Encrypt this data before your send the data to MyBitcoin by using the sci-client library;

$result=mbc_encryptformdata($my_querystring);

Now create a submit button and use [paypage-mbc.php] since you only want to use MyBitcoin

<form action="https://www.mybitcoin.com/sci/paypage-mbc.php" method="post">
<input type="hidden" name="t" value="$result">
<input type="submit" value="Pay with MyBitcoin" />
</form>

The encrypted string will look something like;

value="g5nQzBp6cAuaPKmDw8myzwZByoj4oiHvaOFiHcbuBrtZZ1kgxSlf5QKBgc3KB6ui9iheNlwiDYFB6X-pcYqQ0x5G082Wg6MxdO7j4FUxqSrjT8oxDk9ox-S7qlYP9G7edrVApok600SNT7Iqj3C_Mpky7TONHrXBU2Wg9wkZ4Fwiw0y_Nw7s-TopxmW8z3yaCLzDwKOirnGZz8Rp7TOnywEHzE0YSm0ME2uKCE9cJ6l6F9cYNMJUJpBy7aZLDB7FohpwhA1TUL4J1YtDZVAq45gmXCK-AZBuYZLIClHRPCjYktVcXFtVVKU-dqp9Bj3K0KeJAy0%2C"

For your info;

[paypage.php] will give the payer to option to choose either Bitcoin or MyBitcoin as payment option
[paypage-mbc.php] will allow the payer to only use MyBitcoin as payment option
[paypage-bc.php] will allow the payer to only use Bitcoin as payment option

Record everything you get back from the Mybitcoin server in your database or flat file with the sci-receipt handler.

Now you use the database information recorded to compare with the cookie information in the returning browser - if that match, then you have the same user. Just build in some sort of delay for just in case the MyBitcoin server is slow - not that I have experienced it in any way. If no data is found allow the page to refresh after two seconds to run the script again and if it fail again let the script send you an email with the details.

Also note that you have to send some baggage information or else you will get an error.

Hope this help you,

Hamburger

If for any insane reason you found this post helpful: Bit me a @ 1AvN36TvnWxkUYYBRckpRxyFcys5Z28bSB

Datacoin : DHZ6H91fsDoBHbdqED3ysCJJ2TUh3zRMZD
Krugercoin : Yz3A9sTMp2yh5QLuAL8YQyvS5PdjHRHkkf
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!