I'm running a marketplace website using Dokan Pro where I have integrated Stripe Connect. Now I want to integrate iDeal with it but they don't have it officially so I'm following Stripe's documentation to do some custom coding but I'm not able to achieve anything so far.
Stripe provided me this documentation:
https://stripe.com/docs/connect/direct-charges#create-a-charge
There's an official plugin on Stripe For Woocommerce that also has iDeal option but the problem is that it doesn't split payment because it doesn't work with Stripe Connect. I did try to edit it's code but it gives me an error when I send the application_fee parameter. Here's the code:
public function create_source( $order ) {
$currency = $order->get_currency();
$return_url = $this->get_stripe_return_url( $order );
$post_data = array();
$post_data['amount'] = WC_Stripe_Helper::get_stripe_amount( $order->get_total(), $currency );
$post_data['currency'] = strtolower( $currency );
$post_data['type'] = 'ideal';
$post_data['application_fee_amount'] = '10';
$post_data['owner'] = $this->get_owner_details( $order );
$post_data['redirect'] = array( 'return_url' => $return_url );
if ( ! empty( $this->statement_descriptor ) ) {
$post_data['statement_descriptor'] = WC_Stripe_Helper::clean_statement_descriptor( $this->statement_descriptor );
}
WC_Stripe_Logger::log( 'Info: Begin creating iDeal source' );
return WC_Stripe_API::request( apply_filters( 'wc_stripe_ideal_source', $post_data, $order ), 'sources' );
}
Any help would be appreciated.
Assumption: I'm assuming for "split payments" you mean to handle when a customer does a single order/payment to your platform which includes goods/services from more than one provider. You need to allocate the payment and send some of it to more than one destination account.
A couple of items that I think are making things difficult for you:
On server:
On client:
On server, later: