Skip to content

Commit

Permalink
Merge pull request #5 from WordImpress/issues/4
Browse files Browse the repository at this point in the history
Fix cron name
  • Loading branch information
Devin Walker authored Mar 2, 2017
2 parents f5eff1b + 09bb089 commit 68b4b5f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions includes/lib/class-give-payumoney-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ public static function process_success( $donation_id ) {
$donation->update_status( 'completed' );
$donation->add_note( sprintf( __( 'PayUmoney payment completed (Transaction id: %s)', 'give-payumoney' ), $_REQUEST['txnid'] ) );

wp_clear_scheduled_hook( "give_payumoney_set_donation_{$donation_id}_abandoned", array( absint( $donation_id ) ) );
wp_clear_scheduled_hook( 'give_payumoney_set_donation_abandoned', array( absint( $donation_id ) ) );

give_set_payment_transaction_id( $donation_id, $_REQUEST['txnid'] );
update_post_meta( $donation_id, 'payumoney_donation_response', $_REQUEST );
Expand All @@ -257,7 +257,7 @@ public static function process_failure( $donation_id ) {
$donation->update_status( 'failed' );
$donation->add_note( sprintf( __( 'PayUmoney payment failed (Transaction id: %s)', 'give-payumoney' ), $_REQUEST['txnid'] ) );

wp_clear_scheduled_hook( "give_payumoney_set_donation_{$donation_id}_abandoned", array( absint( $donation_id ) ) );
wp_clear_scheduled_hook( 'give_payumoney_set_donation_abandoned', array( absint( $donation_id ) ) );

give_set_payment_transaction_id( $donation_id, $_REQUEST['txnid'] );
update_post_meta( $donation_id, 'payumoney_donation_response', $_REQUEST );
Expand Down Expand Up @@ -285,7 +285,7 @@ public static function process_pending( $donation_id ) {
$donation = new Give_Payment( $donation_id );
$donation->add_note( sprintf( __( 'PayUmoney payment has "%s" status. Check the <a href="%s" target="_blank">PayUmoney merchant dashboard</a> for more information or check the <a href="%s" target="_blank">payment gateway error logs</a> for additional details', 'give-payumoney' ), $_REQUEST['status'], "https://www.payumoney.com/merchant/dashboard/#/paymentCompleteDetails/{$_REQUEST['payuMoneyId']}", admin_url( 'edit.php?post_type=give_forms&page=give-tools&tab=logs&section=gateway_errors' ) ) );

wp_clear_scheduled_hook( "give_payumoney_set_donation_{$donation_id}_abandoned", array( absint( $donation_id ) ) );
wp_clear_scheduled_hook( 'give_payumoney_set_donation_abandoned', array( absint( $donation_id ) ) );

give_set_payment_transaction_id( $donation_id, $_REQUEST['txnid'] );
update_post_meta( $donation_id, 'payumoney_donation_response', $_REQUEST );
Expand Down
2 changes: 1 addition & 1 deletion includes/payment-processing.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function give_process_payumoney_payment( $donation_data ) {
}

// Auto set payment to abandoned in one hour if donor is not able to donate in that time.
wp_schedule_single_event( current_time( 'timestamp', 1 ) + HOUR_IN_SECONDS, "give_payumoney_set_donation_{$payment}_abandoned", array( $payment ) );
wp_schedule_single_event( current_time( 'timestamp', 1 ) + HOUR_IN_SECONDS, 'give_payumoney_set_donation_abandoned', array( $payment ) );

// Send to success page.
wp_redirect( home_url( "/?process_payu_payment=processing&donation={$payment}&form-id={$form_id}" ) );
Expand Down

0 comments on commit 68b4b5f

Please sign in to comment.