Skip to content

Commit

Permalink
Merge pull request #1335 from WordImpress/issue/1334
Browse files Browse the repository at this point in the history
Issue/1334
  • Loading branch information
Devin Walker committed Dec 10, 2016
2 parents 562d9fe + ee5db5b commit 92452e1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions includes/gateways/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ function give_get_payment_gateways() {
// Default, built-in gateways
$gateways = array(
'paypal' => array(
'admin_label' => esc_html__( 'PayPal Standard', 'give' ),
'checkout_label' => esc_html__( 'PayPal', 'give' ),
'admin_label' => __( 'PayPal Standard', 'give' ),
'checkout_label' => __( 'PayPal', 'give' ),
),
'manual' => array(
'admin_label' => esc_html__( 'Test Donation', 'give' ),
'checkout_label' => esc_html__( 'Test Donation', 'give' )
'admin_label' => __( 'Test Donation', 'give' ),
'checkout_label' => __( 'Test Donation', 'give' )
),
);

Expand Down Expand Up @@ -124,7 +124,7 @@ function give_get_gateway_admin_label( $gateway ) {

if ( $gateway == 'manual' && $payment ) {
if ( give_get_payment_amount( $payment ) == 0 ) {
$label = esc_html__( 'Test Donation', 'give' );
$label = __( 'Test Donation', 'give' );
}
}

Expand All @@ -145,7 +145,7 @@ function give_get_gateway_checkout_label( $gateway ) {
$label = isset( $gateways[ $gateway ] ) ? $gateways[ $gateway ]['checkout_label'] : $gateway;

if ( $gateway == 'manual' ) {
$label = esc_html__( 'Test Donation', 'give' );
$label = __( 'Test Donation', 'give' );
}

return apply_filters( 'give_gateway_checkout_label', $label, $gateway );
Expand Down
8 changes: 4 additions & 4 deletions includes/gateways/paypal-standard.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@
function give_process_paypal_payment( $payment_data ) {

if ( ! wp_verify_nonce( $payment_data['gateway_nonce'], 'give-gateway' ) ) {
wp_die( esc_html__( 'Nonce verification has failed.', 'give' ), esc_html__( 'Error', 'give' ), array( 'response' => 403 ) );
wp_die( __( 'Nonce verification has failed.', 'give' ), __( 'Error', 'give' ), array( 'response' => 403 ) );
}

$form_id = intval( $payment_data['post_data']['give-form-id'] );
$price_id = isset( $payment_data['post_data']['give-price-id'] ) ? $payment_data['post_data']['give-price-id'] : '';

// Collect payment data.
$payment_data = array(
// Collect Give's payment data.
$insert_payment_args = array(
'price' => $payment_data['price'],
'give_form_title' => $payment_data['post_data']['give-form-title'],
'give_form_id' => $form_id,
Expand All @@ -57,7 +57,7 @@ function give_process_paypal_payment( $payment_data ) {
);

// Record the pending payment.
$payment_id = give_insert_payment( $payment_data );
$payment_id = give_insert_payment( $insert_payment_args );

// Check payment.
if ( ! $payment_id ) {
Expand Down

0 comments on commit 92452e1

Please sign in to comment.