Changeset 2181432
- Timestamp:
- 10/28/2019 11:37:06 AM (6 years ago)
- Location:
- lamium-decentralized-crypto-acceptance-and-conversion/trunk
- Files:
-
- 2 edited
-
readme.md (modified) (1 diff)
-
woocommerce-gateway-lamium-accept-crypto-api.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lamium-decentralized-crypto-acceptance-and-conversion/trunk/readme.md
r2179314 r2181432 7 7 - Requires WooCommerce at least: 2.1 8 8 - Tested WooCommerce up to: 3.6.5 9 - Stable Tag: 2.0. 09 - Stable Tag: 2.0.1 10 10 - License: GPLv3 11 11 - License URI: http://www.gnu.org/licenses/gpl-3.0.html -
lamium-decentralized-crypto-acceptance-and-conversion/trunk/woocommerce-gateway-lamium-accept-crypto-api.php
r2179482 r2181432 7 7 * Author: Kryptolis AGc 8 8 * Author URI: https://www.lamium.io/ 9 * Version: 2 9 * Version: 2.0.1 10 10 * Text Domain: woocommerce-gateway-lamium-accept-bitcoin-api 11 11 * Domain Path: /languages/ … … 372 372 update_post_meta( $order_id , '_lamium_api_error_url',$url.'--- plugin url--'.get_home_url(). 373 373 '---call failed'); 374 //$this->_fail($apiDataRemoteCall,'/payments/paybitcoins call failed',$orderData);375 374 } 376 375 // Mark as payment-pending (we're awaiting the payment) … … 413 412 } 414 413 </script>'; 415 416 // if(!empty($apiDataRemoteCall->data[0]->pay_with_bitalo)){417 // $content .='<tr><td><a style="background:#2778b2;padding:10px 10px 10px 10px;color:#fff" href ="'.$apiDataRemoteCall->data[0]->pay_with_bitalo.'" class="button" target="_blank">Pay with Lamium</a><td></tr>';418 // }419 414 $content .='</table>'; 420 415 $content .= $this->_get_custom_email_html( $order, $subject, $mailer ); … … 437 432 } 438 433 </script>'; 439 // if(!empty($apiDataRemoteCall->data[0]->pay_with_bitalo)){440 // $paymentDetailsBlock .='<p><a style="background:#2778b2;padding:10px 10px 10px 10px;color:#fff" href ="'.$apiDataRemoteCall->data[0]->pay_with_bitalo.'" class="button" target="_blank">Pay with Lamium</a></p>';441 // }442 443 434 $lamiumData = '<ul class="woocommerce-order-overview woocommerce-thankyou-order-details order_details"> 444 435 <li class="woocommerce-order-overview__order order"><p>Please send '.$apiDataRemoteCall->data[0]->payment_method. ' to the following address :</p> … … 523 514 $url = 'http://api.lamium.io/api/payments/paybitcoinsallorderpaymentstatusforbitcoin'; 524 515 $lamiumApiData = json_encode($lamiumApiData); 525 //$this->_tryCatchError('Lamium api data ---'.$lamiumApiData);526 516 $tokenRemoteCall = $this->_getCoinnexusToken(); 527 //$this->_tryCatchError('Token call data ---'.$tokenRemoteCall);528 517 $tokenRemoteCall =json_decode($tokenRemoteCall['body']); 529 518 if(empty($tokenRemoteCall->success)) 530 519 { 531 //$this->_fail($tokenRemoteCall,$url.'-- call failed',false,true); 532 //return true; 520 533 521 }else{ 534 522 $apiDataRemoteCall = $this->_wpRemoteCall($url,$lamiumApiData,$tokenRemoteCall->data->token); 535 //$this->_tryCatchError('Status call data ---'.json_decode($apiDataRemoteCall['body']));536 523 $apiDataRemoteCall =json_decode($apiDataRemoteCall['body']); 537 //$this->_fail($tokenRemoteCall,$url.'---call test',$apiDataRemoteCall,true);538 524 if(!empty($apiDataRemoteCall->success)) 539 525 { … … 561 547 562 548 } 563 //$this->_tryCatchError('Lamium api data ---'.$lamiumApiData);564 549 $transaction_ids = array(); 565 550 $orderIdTransactionIdMap = array(); … … 574 559 $orderIdTransactionIdMap[$transaction_id] = $customer_order->ID; 575 560 } 576 //$this->_tryCatchError('Lamium api data test---'.$transaction_ids);577 561 $lamiumApiData['merchant_id'] = $merchantId; 578 562 $lamiumApiData['transaction_ids'] = $transaction_ids; … … 580 564 $lamiumApiData = json_encode($lamiumApiData); 581 565 582 //$this->_tryCatchError('Lamium api data --- encoded'.$lamiumApiData);583 566 $tokenRemoteCall = $this->_getCoinnexusToken(); 584 567 $tokenRemoteCall =json_decode($tokenRemoteCall['body']); 585 //$this->_tryCatchError('Token call data ---'.$tokenRemoteCall->data->token);586 568 if(empty($tokenRemoteCall->success)) 587 569 { 570 571 }else{ 588 572 589 // $this->_fail($tokenRemoteCall,$url.'-- call failed',false,true);590 591 // $this->_tryCatchError('Token call failed ---'.$tokenRemoteCall->data);592 593 }else{594 //$this->_tryCatchError('Status call before ---');595 573 $apiDataRemoteCall = $this->_wpRemoteCall($url,$lamiumApiData,$tokenRemoteCall->data->token); 596 //$this->_tryCatchError('Status call after ---'.$apiDataRemoteCall['body']);597 574 $apiDataRemoteCall =json_decode($apiDataRemoteCall['body']); 598 // $this->_tryCatchError('Status call after decode ---'.$apiDataRemoteCall->success);599 // $this->_tryCatchError('Status call data ---'.$apiDataRemoteCall);600 //$this->_fail($tokenRemoteCall,$url.'---call test',$apiDataRemoteCall,true);601 575 if(!empty($apiDataRemoteCall->success)) 602 576 {
Note: See TracChangeset
for help on using the changeset viewer.