Created
October 4, 2016 20:13
-
-
Save dancameron/0198549305b80dcedd5c96a9f6e2a3f7 to your computer and use it in GitHub Desktop.
Sprout Payment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$invoice_id = 559 ; | |
$invoice = SI_Invoice::get_instance( $invoice_id ); | |
//print_r($invoice); | |
$amount = 100 ; | |
$transaction_id = '1' ; | |
$date = '2011-12-22 12:00:00'; | |
$notes = 'CASH' ; | |
$number = ''; | |
$payment_id = SI_Payment::new_payment( array( | |
'payment_method' => SI_Admin_Payment::get_payment_method(), | |
'invoice' => $invoice_id, | |
'amount' => $amount, | |
'transaction_id' => $number, | |
'data' => array( | |
'amount' => $amount, | |
'check_number' => $number, | |
'date' => strtotime( $date ), | |
'notes' => $notes | |
), | |
), SI_Payment::STATUS_COMPLETE ); | |
if ( !$payment_id ) { | |
return FALSE; | |
} | |
do_action( 'admin_payment', $payment_id, $invoice ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment