Пример #1
0
 /**
  * Construct and initialize payment object
  *
  * @param int $post_id
  */
 public function __construct($post_id)
 {
     parent::__construct();
     $this->id = $post_id;
     $this->post = get_post($post_id);
     // Load
     $this->config_id = get_post_meta($post_id, '_pronamic_payment_config_id', true);
     $this->amount = get_post_meta($post_id, '_pronamic_payment_amount', true);
     $this->currency = get_post_meta($post_id, '_pronamic_payment_currency', true);
     $this->transaction_id = get_post_meta($post_id, '_pronamic_payment_transaction_id', true);
     $this->action_url = get_post_meta($post_id, '_pronamic_payment_action_url', true);
     $this->source = get_post_meta($post_id, '_pronamic_payment_source', true);
     $this->source_id = get_post_meta($post_id, '_pronamic_payment_source_id', true);
     $this->email = get_post_meta($post_id, '_pronamic_payment_email', true);
     $this->status = get_post_meta($post_id, '_pronamic_payment_status', true);
 }