troubleshooting Question

How to integrate an online payment service (DIBS) into a custom website using PHP?

Avatar of Gaute Rønningen
Gaute RønningenFlag for Norway asked on
PHPE-CommerceWordPress
4 Comments2 Solutions1381 ViewsLast Modified:
Hi experts,

I have a website that uses WordPress. It's in need of a shopping cart/payment service and I have been looking into the DIBS Payment Processor (http://www.dibspayment.com/). The API seems well documented, but as usual I have problems understanding and comprehending it all.

I've created some code (attached), but I'm not sure how to continue developing this. The database updating part requires me to know the order number and if the payment has been accepted or declined. I think I have the "accepted or declined" part fixed, but I have no idea how they would send me the other bit(s). The best thing would be seeing what the DIBS functions require and what they return - but I cannot seem to find any of that in the API.

I did try downloading Drupal - but I do not know how to use it. (Yes, I feel stupid now)

Anyone have any experience on the area?
eX.
<?php
global $wpdb;
global $current_user;
get_currentuserinfo();

if ($_REQUEST['dibs_status'] == '') {
	$dibs_status = $_REQUEST['status'];
} else {
	$dibs_status = 'DECLINED';
}

if ($dibs_status == 'ACCEPTED') {
// TODO: run database stuff
	?>
    [hide 2]
	<h2>Thank you</h2>
	<p>Thank you for your order. Further information has been mailed to you at: <?php echo $current_user->user_email; ?>. Should you require further assistance please do not hesitate contacting us.</p>       
	[hide 2]
	<?php
} else {
	?>
    [hide 2]
	<h2>Order Canceled</h2>
    <p>Your order was canceled or declined by our payment processor. If you still wish to order one of our products, please contact us using the contact form.</p>
	[hide 2]
	<?php
}
?>
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 2 Answers and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros