derderderder
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce Stripe Payment Gateway] SEPA auto okIs there a way to send with this solution the “payment ok” mail like the native paypal implementation? My problem is that SOFORT and GIROPAY is async here. So the user gets only a order confirmation with the link to the payment and after the payment is complete, no additional mail is send. As I send tickets in the order confirmation, the user don’t get the tickets because in the moment of the confirmation mail, the order is not payed and the tickets are not issued.
The native paypal integration sends after the IPN an additional mail which I assume is called “payment ok”. I don’t know how to trigger this email in the hook. Can anyone help?
A direkt implementation of this feature in the plugin would be really great…
Forum: Plugins
In reply to: [WooCommerce Stripe Payment Gateway] SEPA auto okHere my solution which I adapted from another thread:
add_action( ‘wc_gateway_stripe_process_response’, ‘action_wc_gateway_stripe_regard_sepa_pending_as_complete’, 0, 2);
/**
* Action function that sets the order to “payment completed” even if the SEPA direct debit is pending at Stripe.
* @author Kai Mindermann
*/
function action_wc_gateway_stripe_regard_sepa_pending_as_complete ($response, $order) {// check if payment (stripe response) is in pending state
// check if payment (stripe response) is of ‘sepa_debit’ type
// check if order contains a subscription
if( $response->status === ‘pending’ && $response->source->type === ‘sepa_debit’) {
$order->payment_complete($response->id);/* translators: response id */
$order->add_order_note( sprintf( __( ‘Pending status automatically set as payment complete by custom hook (Charge ID: %s)’, ‘woocommerce-gateway-stripe’ ), $response->id ) );
if ( is_callable( array( $order, ‘save’ ) ) ) {
$order->save();
}
}
// TODO update post_meta?
// TODO update fees
}Forum: Plugins
In reply to: [WooCommerce Stripe Payment Gateway] No confirmation after SEPA successyes, exactly. This is really frustrating. How can I solve this problem?