Skip to content

Commit

Permalink
Use payment parameter for output fields.
Browse files Browse the repository at this point in the history
  • Loading branch information
rvdsteege committed Nov 15, 2019
1 parent fbcfd29 commit 68ea843
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/Gateway.php
Expand Up @@ -95,7 +95,20 @@ public function get_supported_payment_methods() {
*/
public function start( Payment $payment ) {
$payment->set_action_url( $this->client->get_payment_server_url() );
}

/**
* Get output HTML
*
* @param Payment $payment Payment.
*
* @return string
*
* @see Core_Gateway::get_output_html()
* @since 1.1.1
* @version 2.0.4
*/
public function get_output_fields( Payment $payment ) {
$payment_method = $payment->get_method();

switch ( $payment_method ) {
Expand Down Expand Up @@ -149,15 +162,7 @@ public function start( Payment $payment ) {
$this->client->set_return_cancel_url( $payment->get_return_url() );
$this->client->set_return_error_url( $payment->get_return_url() );
$this->client->set_return_reject_url( $payment->get_return_url() );
}

/**
* Get output HTML
*
* @since 1.1.1
* @see Pronamic_WP_Pay_Gateway::get_output_html()
*/
public function get_output_fields() {
return $this->client->get_fields();
}

Expand Down

0 comments on commit 68ea843

Please sign in to comment.