create account

[Steempay-woo-plugin] Follow up: What went wrong, why and how it's solved within minutes by steve-walschot

View this thread on: hive.blogpeakd.comecency.com
· @steve-walschot · (edited)
$53.84
[Steempay-woo-plugin] Follow up: What went wrong, why and how it's solved within minutes
Greetings steemians!

# So it has been a bumpy ride for the [first Wordpress plugin that makes accepting STEEM/SBD](https://steemit.com/steempay/@steve-walschot/steempay-steem-s-first-woocommerce-plugin-accept-steem-sbd-on-wordpress-eur-usd-supported) possible.


https://img1.steemit.com/0x0/http://www.wpopal.com/wp-content/uploads/2015/07/woocommerce-plugin-development.jpg

## Yes! I made the first plugin ever!
After a successfull launch and good feedback, i've helped users who still had questions, and after about 5h after launch I closed the evening with this message on the #witness chat channel:

> @fyrstikken made a review of the woo plug-in. 5 star rating. Sweet! Now, my fellow witnesses, I'll go to sleep for the first time in days at a reasonable hour (23:15). Read you all tomorrow guys.

## 06:00: Waking up....

@roelandp discovered an [essential flaw](https://steemit.com/steempay/@roelandp/whitehat-report-warning-don-t-install-steempay-woo-commerce-plugin-for-now-it-s-very-beta) in my plugin. What!! How? Where? After reading trough his post I said to myself, this can't be happening! I've run at least a dozen of tests against this kind of issues? What's wrong!

## You dumb *********************** !!!!!!!
Seriously? I uploaded the wrong folder to Github?? Oh shiat! I really did upload my development folder to Github instead of the production one!

The tiny difference that made the exploit possible can be found right here:

**Dev file (used for internal testing, values to 0)**

    $environment_url = ( 'https://steempay.io/payment/verify?' ) ;
    $payload = array(
    					"payid"           		=> $_REQUEST['payid'],
    					"receiver"              => 'steve-walschot', // ToDo: Replace with settings
    					"amount"            	=> "0", // ToDo: Replace with $wc_order->get_total()
    					"currency"             	=> "0", // ToDo: Replace with $wc_order->get_order_currency()
    			);

**Production file (the one you should be using)**

    $environment_url = ( 'https://steempay.io/payment/verify/woo?' ) ;
    $payload = array(
    					"receiver"              => $this -> receiver_id,
    					"amount"            	=> $wc_order->get_total(),
    					"currency"             	=> $wc_order->get_order_currency(),
    					'merchant_order_id'		=> $wc_order_id,
    					'output'				=> $this->steem_currency,
    					'payid'					=> $_REQUEST['payid']
    			);


## Ok guys, it's a human error
I've uploaded the wrong source to Github. How? I'm not sure. I know i've used Github for Windows and assume I simply forgot that the folder was still my dev folder. I'll take the shot for that one.

The issue was resolved within minutes but the harm had been done. @roelandp made a post warning the users not to use the plugin until this issue had been resolved. Thanks again for that one, you prevented further damage to our userbase.

My aplogies to the people that could have suffered from my lack of concentration on those last meters of the sprint towards the first Wordpress plugin.

### Just a small post to keep you all updated!
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 179 others
👎  ,
properties (23)
authorsteve-walschot
permlinksteempay-woo-plugin-follow-up-what-went-wrong-why-and-how-it-s-solved-within-minutes
categorysteempay
json_metadata{"tags":["steempay","plugin","apologies","exploit","witness"],"users":["fyrstikken","roelandp"],"image":["https://img1.steemit.com/0x0/http://www.wpopal.com/wp-content/uploads/2015/07/woocommerce-plugin-development.jpg"],"links":["https://steemit.com/steempay/@steve-walschot/steempay-steem-s-first-woocommerce-plugin-accept-steem-sbd-on-wordpress-eur-usd-supported","https://steemit.com/steempay/@roelandp/whitehat-report-warning-don-t-install-steempay-woo-commerce-plugin-for-now-it-s-very-beta"]}
created2016-10-03 15:26:39
last_update2016-10-03 15:29:12
depth0
children9
last_payout2016-11-03 16:29:18
cashout_time1969-12-31 23:59:59
total_payout_value50.920 HBD
curator_payout_value2.921 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length3,067
author_reputation67,732,836,345,004
root_title"[Steempay-woo-plugin] Follow up: What went wrong, why and how it's solved within minutes"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id1,431,539
net_rshares35,637,661,649,735
author_curate_reward""
vote details (245)
@acidyo ·
I noticed @roelandp's post late as well and felt bad for having re-steemed yours in case more users would've lost money/value on the bug. Glad nothing worse happened though!

PS. An option to remove re-blogs or have them run out of time and get removed from your "wall" after a certain payout would be nice.
properties (22)
authoracidyo
permlinkre-steve-walschot-steempay-woo-plugin-follow-up-what-went-wrong-why-and-how-it-s-solved-within-minutes-20161003t153225236z
categorysteempay
json_metadata{"tags":["steempay"],"users":["roelandp"]}
created2016-10-03 15:32:24
last_update2016-10-03 15:32:24
depth1
children0
last_payout2016-11-03 16:29:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length307
author_reputation3,338,878,862,095,167
root_title"[Steempay-woo-plugin] Follow up: What went wrong, why and how it's solved within minutes"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id1,431,608
net_rshares0
@goldmatters ·
Resteemed
👍  
properties (23)
authorgoldmatters
permlinkre-steve-walschot-steempay-woo-plugin-follow-up-what-went-wrong-why-and-how-it-s-solved-within-minutes-20161003t152735961z
categorysteempay
json_metadata{"tags":["steempay"]}
created2016-10-03 15:27:36
last_update2016-10-03 15:27:36
depth1
children0
last_payout2016-11-03 16:29:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length9
author_reputation409,743,405,777,482
root_title"[Steempay-woo-plugin] Follow up: What went wrong, why and how it's solved within minutes"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id1,431,549
net_rshares50,058,564,960
author_curate_reward""
vote details (1)
@jlufer ·
excellent thank you very much
properties (22)
authorjlufer
permlinkre-steve-walschot-steempay-woo-plugin-follow-up-what-went-wrong-why-and-how-it-s-solved-within-minutes-20161003t153002537z
categorysteempay
json_metadata{"tags":["steempay"]}
created2016-10-03 15:30:03
last_update2016-10-03 15:30:03
depth1
children0
last_payout2016-11-03 16:29:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length29
author_reputation1,399,686,843,079,597
root_title"[Steempay-woo-plugin] Follow up: What went wrong, why and how it's solved within minutes"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id1,431,582
net_rshares0
@joachim ·
Thanks for the update, and thanks for developing this as well!
properties (22)
authorjoachim
permlinkre-steve-walschot-steempay-woo-plugin-follow-up-what-went-wrong-why-and-how-it-s-solved-within-minutes-20161003t161507255z
categorysteempay
json_metadata{"tags":["steempay"]}
created2016-10-03 16:15:09
last_update2016-10-03 16:15:09
depth1
children0
last_payout2016-11-03 16:29:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length62
author_reputation2,368,226,167,791
root_title"[Steempay-woo-plugin] Follow up: What went wrong, why and how it's solved within minutes"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id1,432,029
net_rshares0
@jrcornel ·
Thanks for the update. This is just a small step in the process of getting mass adoption for the Steem currency... If we can accomplish that there is no telling how high the price of Steem might go.
properties (22)
authorjrcornel
permlinkre-steve-walschot-steempay-woo-plugin-follow-up-what-went-wrong-why-and-how-it-s-solved-within-minutes-20161003t153757432z
categorysteempay
json_metadata{"tags":["steempay"]}
created2016-10-03 15:38:00
last_update2016-10-03 15:38:00
depth1
children0
last_payout2016-11-03 16:29:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length198
author_reputation2,133,450,396,741,846
root_title"[Steempay-woo-plugin] Follow up: What went wrong, why and how it's solved within minutes"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id1,431,683
net_rshares0
@kommienezuspadt ·
I'm really interested in using this plugin @steve-walschot! Thanks for all the hard work!
properties (22)
authorkommienezuspadt
permlinkre-steve-walschot-steempay-woo-plugin-follow-up-what-went-wrong-why-and-how-it-s-solved-within-minutes-20161004t180703407z
categorysteempay
json_metadata{"tags":["steempay"],"users":["steve-walschot"]}
created2016-10-04 18:07:03
last_update2016-10-04 18:07:03
depth1
children0
last_payout2016-11-03 16:29:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length89
author_reputation969,862,093,724,440
root_title"[Steempay-woo-plugin] Follow up: What went wrong, why and how it's solved within minutes"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id1,442,762
net_rshares0
@n25052016 ·
Couldn't find  any TODO comments in your previous commits.
actually that part was:
```	
"payid"           		=> $_REQUEST['payid'],
"receiver"              => $this -> receiver_id,
"amount"            	=> "0",
"currency"             	=> "0"
```
Which is mentioned in @roelandp post and can be found on github.
It not looks like your Dev file.
properties (22)
authorn25052016
permlinkre-steve-walschot-steempay-woo-plugin-follow-up-what-went-wrong-why-and-how-it-s-solved-within-minutes-20161003t164934235z
categorysteempay
json_metadata{"tags":["steempay"],"users":["roelandp"]}
created2016-10-03 16:49:33
last_update2016-10-03 16:49:33
depth1
children1
last_payout2016-11-03 16:29:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length341
author_reputation508,658,124,500
root_title"[Steempay-woo-plugin] Follow up: What went wrong, why and how it's solved within minutes"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id1,432,369
net_rshares0
@roelandp · (edited)
$0.05
yup. actually, also the url https vs. http is different. Steve said he had (yet) another folder which he developed in, so that explains why.... So a third folder with a copy of the plugin.
👍  ,
properties (23)
authorroelandp
permlinkre-n25052016-re-steve-walschot-steempay-woo-plugin-follow-up-what-went-wrong-why-and-how-it-s-solved-within-minutes-20161003t181712058z
categorysteempay
json_metadata{"tags":["steempay"]}
created2016-10-03 18:17:12
last_update2016-10-03 18:17:36
depth2
children0
last_payout2016-11-03 16:29:18
cashout_time1969-12-31 23:59:59
total_payout_value0.048 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length188
author_reputation662,936,810,561,284
root_title"[Steempay-woo-plugin] Follow up: What went wrong, why and how it's solved within minutes"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id1,433,245
net_rshares295,271,912,862
author_curate_reward""
vote details (2)
@thebatchman ·
Good to see this has been updated. I have to say my comment on @roelandp's article on this was a bit negative, because I was under the impression this was a basic code error. Meanwhile it turned out to be a upload error. I shouldn't have been so quick to jump the gun.
👍  
properties (23)
authorthebatchman
permlinkre-steve-walschot-steempay-woo-plugin-follow-up-what-went-wrong-why-and-how-it-s-solved-within-minutes-20161003t162431680z
categorysteempay
json_metadata{"tags":["steempay"],"users":["roelandp"]}
created2016-10-03 16:24:30
last_update2016-10-03 16:24:30
depth1
children0
last_payout2016-11-03 16:29:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length268
author_reputation10,499,752,392,175
root_title"[Steempay-woo-plugin] Follow up: What went wrong, why and how it's solved within minutes"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id1,432,102
net_rshares22,703,632,587
author_curate_reward""
vote details (1)