create_simple_payment() public static method

Create a simple donation payment.
Since: 1.0
public static create_simple_payment ( )
Esempio n. 1
0
 /**
  * Set it Up
  */
 public function setUp()
 {
     parent::setUp();
     $this->_payment_id = Give_Helper_Payment::create_simple_payment();
     //$20
     $this->_payment_id2 = Give_Helper_Payment::create_multilevel_payment();
     //$25
     give_update_payment_status($this->_payment_id);
     give_update_payment_status($this->_payment_id2);
 }
Esempio n. 2
0
 /**
  * Set it Up
  */
 public function setUp()
 {
     parent::setUp();
     $payment_id = Give_Helper_Payment::create_simple_payment();
     $this->_payment_key = give_get_payment_key($payment_id);
     $this->_payment_id = $payment_id;
     $this->_key = $this->_payment_key;
     $this->_transaction_id = 'FIR3SID3';
     give_set_payment_transaction_id($payment_id, $this->_transaction_id);
     give_insert_payment_note($payment_id, sprintf(esc_html__('PayPal Transaction ID: %s', 'give'), $this->_transaction_id));
     // Make sure we're working off a clean object caching in WP Core.
     // Prevents some payment_meta from not being present.
     clean_post_cache($payment_id);
     update_postmeta_cache(array($payment_id));
 }