Reputation: 179
I stuck with next problem:
On my website I have online shop, there I can buy products of 2 types: virtual(subscription) and physical(shoes etc).
User should have a possibility to buy combined bundle of vritual + physical products.
The issue is: 1) that virtual products doesn't have a shippment, and physical does. so subscription should be assigned to user immediatley after purchase (order status completed), but physical product price should be acquired after completing shipment(order status pending and then completed)
2) virtual products (subscriptions) should be recurring, physical doesn't
As payment provider, I'm using dibs payment window, so I can perform recurring payments(only for subscriptions) or single payments(only for physical), but can't for both.
Upvotes: 0
Views: 407
Reputation: 26
To combine recurring payment and single payment in one order using DIBS Payment Window you should provide the input parameter createTicketAndAuth
with the value of 1
.
If set to 1 we will first attempt to create an authorization. If successful, we will save information about the card for continuous authorizations and afterwards do a normal autorization for the specified amount. DIBS will return both a “ticket” and a “transaction” value if the request is successful. This parameter cannot be sent if createTicket is sent.
DIBS will then return both transaction
and ticket
as post data to the target you specified in callbackUrl
. You can now capture the initial transaction using the transaction
value and make future re-occuring authorizations using the ticket
value.
When their cards expire or if the user want to change card you can have them update their card by launching a payment window with no order information (oiRow(1..n)
and oiTypes
) with the parameter createTicket
and value 1
. This will register the card and return a new ticket
for you to use.
Source: http://tech.dibspayment.com/
Upvotes: 0