Changeset 2179482
- Timestamp:
- 10/24/2019 04:03:49 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lamium-decentralized-crypto-acceptance-and-conversion/trunk/woocommerce-gateway-lamium-accept-crypto-api.php
r2179314 r2179482 1 1 <?php 2 ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); 2 3 /** 3 4 * Plugin Name: Lamium Decentralized Crypto Acceptance and Conversion Plugin … … 147 148 public function payment_fields() { 148 149 149 // ok, let's display some description before the payment form150 if ( $this->description ) {151 // you can instructions for test mode, I mean test card numbers etc.152 if ( $this->testmode ) {153 $this->description .= ' TEST MODE ENABLED. In test mode, you can use the card numbers listed in <a href="#" target="_blank" rel="noopener noreferrer">documentation</a>.';154 $this->description = trim( $this->description );155 }156 // display the description with <p> tags etc.157 echo wpautop( wp_kses_post( $this->description ) );158 }159 150 160 151 // I will echo() the form, but you can close PHP tags and print it directly in HTML … … 328 319 public function process_payment( $order_id ) 329 320 { 330 321 331 322 332 323 try { … … 408 399 $content = '<div>Dear '.$orderData['billing']['first_name'].' '.$orderData['billing']['last_name'].',<br/> 409 400 Thank you for your order at '.get_bloginfo().'.</div> 410 <div>In order to complete the order please send '.$apiDataRemoteCall->data[0]-> crypto_currency_choosen. ' to the following address:</div>401 <div>In order to complete the order please send '.$apiDataRemoteCall->data[0]->payment_method. ' to the following address:</div> 411 402 <table class="woocommerce-order-overview woocommerce-thankyou-order-details order_details"> 412 403 <tr><td>'.$apiDataRemoteCall->data[0]->crypto_currency_choosen. ': <strong>'.$apiDataRemoteCall->data[0]->btc_address.'</strong><td><tr> … … 432 423 $mailer->send( $recipient, $subject, $content, $headers ); 433 424 $paymentDetailsBlock ='<ul class="woocommerce-order-overview woocommerce-thankyou-order-details order_details"> 434 <li class="woocommerce-order-overview__order order"><p>Please send '.$apiDataRemoteCall->data[0]-> crypto_currency_choosen. ' to the following address:</p>435 <p>'.$apiDataRemoteCall->data[0]-> crypto_currency_choosen. ' : <strong>'.$apiDataRemoteCall->data[0]->btc_address.'</strong></p>436 <p>'.$apiDataRemoteCall->data[0]-> crypto_currency_choosen. ' Amount : <strong>'.$apiDataRemoteCall->data[0]->btc_amount.'</strong></p>425 <li class="woocommerce-order-overview__order order"><p>Please send '.$apiDataRemoteCall->data[0]->payment_method. ' to the following address:</p> 426 <p>'.$apiDataRemoteCall->data[0]->payment_method. ' : <strong>'.$apiDataRemoteCall->data[0]->btc_address.'</strong></p> 427 <p>'.$apiDataRemoteCall->data[0]->payment_method. ' Amount : <strong>'.$apiDataRemoteCall->data[0]->btc_amount.'</strong></p> 437 428 <p>Message/Reference : <strong>'.$apiDataRemoteCall->data[0]->customer_reference.'</strong></p> 438 429 <p><button onclick="openInvoice()">Pay Now</button></p> … … 451 442 452 443 $lamiumData = '<ul class="woocommerce-order-overview woocommerce-thankyou-order-details order_details"> 453 <li class="woocommerce-order-overview__order order"><p>Please send '.$apiDataRemoteCall->data[0]-> crypto_currency_choosen. ' to the following address :</p>454 <p>'.$apiDataRemoteCall->data[0]-> crypto_currency_choosen. ' : <strong>'.$apiDataRemoteCall->data[0]->btc_address.'</strong></p>455 <p>'.$apiDataRemoteCall->data[0]-> crypto_currency_choosen. ' Amount: <strong>'.$apiDataRemoteCall->data[0]->btc_amount.'</strong></p>444 <li class="woocommerce-order-overview__order order"><p>Please send '.$apiDataRemoteCall->data[0]->payment_method. ' to the following address :</p> 445 <p>'.$apiDataRemoteCall->data[0]->payment_method. ' : <strong>'.$apiDataRemoteCall->data[0]->btc_address.'</strong></p> 446 <p>'.$apiDataRemoteCall->data[0]->payment_method. ' Amount: <strong>'.$apiDataRemoteCall->data[0]->btc_amount.'</strong></p> 456 447 <p>Message/Reference : <strong>'.$apiDataRemoteCall->data[0]->customer_reference.'</strong></p> 457 448 <p>Message/Reference : <strong>'.$apiDataRemoteCall->data[0]->customer_reference.'</strong></p> … … 487 478 } 488 479 public function do_this_hourly_for_crypto_pay() { 489 480 490 481 try 491 482 {
Note: See TracChangeset
for help on using the changeset viewer.