Your cart is currently empty!
Manual Payments with Gravity Forms
—
by
Hello,
we also offer BACS payment to our customers. We have an individual coded payment gateway for online-payments, and within this gateway we have a function very similar to “Enable Gravity Forms Payment Details” https://github.com/richardW8k/enablegfpaymentdetails
For all online payments everything is fine. Referrals are marked as accepted after payment, referral status is updated according to payment status, payment refunds marks referrals as rejected.
And the payment gateway adds a form setting allowing the Payment Details panel to be enabled on the entry detail page for entries not processed by an online-payment (just submitted forms). For this entries the refferals are marked as pending after form submit. See screenshot here: https://www.dropbox.com/s/aaafkm5rmkw7jjw/Screenshot%202017-08-24%2019.38.38.png?dl=0
Do You have some hints for me to prepare my coder how to mark as accepted after payment, update referral status according to payment status, mark referrals as rejected for payment refunds?
Many thanks!
Best regards from Vienna
Rudolf
Comments
One response to “Manual Payments with Gravity Forms”
Hi Rudolf,
I suppose that when you save the form, you have a hook that you can use. So using your post_id, you could get the referral, and update its status. Something like this:
global $affiliates_db;
$referrals_table = $affiliates_db->get_tablename( "referrals" );
$referrals = $affiliates_db->get_objects(
"SELECT referral_id FROM $referrals_table WHERE post_id = %d",
intval( $post_id )
);
if ( $referrals ) {
foreach( $referrals as $referral ) {
$r = new Affiliates_Referral_WordPress( $referral->referral_id );
$r->update( array( 'status' => AFFILIATES_REFERRAL_STATUS_ACCEPTED ) );
// You can get your post's status, and update your referral's status according to.
}
}
Kind Regards,
Antonio B.