Posts

Showing posts from September, 2016

integrate paypal into sharetribe market palce

First you have to create Papal Setting: PaymentSettings .create( community_id: 1 , active: true , payment_gateway: " paypal " , payment_process: " preauthorize " , commission_from_seller: 3 , minimum_price_cents: 50 , minimum_transaction_fee_cents: 12 , confirmation_after_days: 1 ) After added this you will be able to see Connect paypal account button in Admin (http://arvind.lvh.me:3000/en/admin/paypal_preferences) Update you paypal credentials into config.yml

Drag and drop image and store base 64 string then display

<form method="post" action="/upload">     <input type="file"><input id="fileDragName" name="file_name"><input id="fileDragSize"><input id="fileDragType"><input id="fileDragData" name="image_base64">     <div id="holder" style="width:200px; height:200px; border: 10px dashed #ccc" id="holder"></div>     <input type="submit" value="Submit"></input>   </form>     <script type="text/javascript">     function readfiles(files) {       for (var i = 0; i < files.length; i++) {         document.getElementById('fileDragName').value = files[i].name         document.getElementById('fileDragSize').value = files[i].size         document.getElementById('fileDragType').value = files[i].type         document.getElementById('fileDragData'