adirdal
Forum Replies Created
-
Sure. I agree. As long as Woo updates the order with address and confirms the payment I do not really need the request to go from Vipps to OurServer.
So when I create an order directly with the Woo API and specify Vipps as payment nothing happens. Is the reason that isApp is parameter is not set to true, or is it something else?
We want to sell out product as an SaaS solution and we want to avoid having to make the customer add custom REST endpoints (Other than installing the Vipps plugin) for this to work. Would it be possible to add som parameter to the order. In (meta_data) to make the Vipps plugin set isApp=true
Thanks!
This is a sequence diagram of what I want to do. WordPress WooCommerce could be the OrderServer:
https://drive.google.com/file/d/1lvvpb050TgoArdhwKIbKH3KnCCsJfoDp/viewThis process works for Vipps. I have created my one OrderServer mock.
Hi
Thank for offering, you don’t need to spend time on this. At least not before I know that this will actually work the way I want it to.
I should add som more detail to this topic to verify before we proceed.
I will get back to you.
Thanks
I cannot find any woo-vipps logs in wp-content/uploads/wc-logs/.
This is what I intended to do:
I have a WordPress site, and an iOS/Android app fetching the data from the WP REST api and presenting this data natively.
What I want to do is to create a WooCommerce order in the REST api from the app, and pay in the Vipps app on the same device. I’m not a WP developer, so making custom rest endpoint here is no option. I was hoping that it was possible to use the existing REST endpoint. Maybe with some minor changes to the woo vipps plugin.
Again it seems that WP REST api is not good enough for creating a native app.
A kind of a dirty fix would be to test like this:
if(substr( $nickname, 0, 9 ) === "#_BOOKING" || $nickname === "")Found it.
Still the same problem.
Where do I find functions.php? Do you mean em-functions.php?
No. It did not work. Still printing the <DIV…
Thanks!
I think that worked. Replacing ‘ with “.
I will test on my real code and let you know.I agree.
Just testet your suggestion, but it did not work. I now printed out the content of the $nickname field with this:
$nickname = $EM_Booking->output('#_BOOKINGFORMCUSTOM{nickname}'); echo '</li><div style="display:none;">'. $nickname .'</div>';But what is printed is:
<div style="display:none;"><div id="em-booking" class="em-booking css-booking"> <form class="em-booking-form" name="booking-form" method="post" action="#em-booking"> <input type="hidden" name="action" value="booking_add"> <input type="hidden" name="event_id" value="1200"> <input type="hidden" name="_wpnonce" value="940c98b201"> <p class="em-booking-form-details">Du må logge inn eller registrere deg for å gjøre en bestilling.</p> </form> <br class="clear" style="clear:left;"> </div>CUSTOM{nickname}</div>- This reply was modified 7 years, 1 month ago by adirdal.
The !in_array() for $people? is the original code.
Thanks. I will test.
Yes, I noticed. Fixed now.
attendeelist placeholder:
<?php /* @var $EM_Event EM_Event */ $people = array(); $EM_Bookings = $EM_Event->get_bookings(); if( count($EM_Bookings->bookings) > 0 ){ ?> <ul class="event-attendees"> <?php foreach( $EM_Bookings as $EM_Booking){ /* @var $EM_Booking EM_Booking */ $nickname = $EM_Booking->output('#_BOOKINGFORMCUSTOM{nickname}'); if($EM_Booking->booking_status == 1 && !in_array($EM_Booking->get_person()->ID, $people) ){ $people[] = $EM_Booking->get_person()->ID; if($nickname != ''){ echo '<li>'. $nickname .'</li>'; }else{ echo '<li>'. $EM_Booking->get_person()->get_name() .'</li>'; } }elseif($EM_Booking->booking_status == 1 && $EM_Booking->is_no_user() ){ if($nickname != ''){ echo '<li>'. $nickname .'</li>'; }else{ echo '<li>'. $EM_Booking->get_person()->get_name() .'</li>'; } } } ?> </ul> <?php }Sorry, my bad. I did not check my spelling when posting this topic, but I don’t think my code has the same spelling error:
My code looks like this:
$EM_Booking->output(‘#_BOOKINGFORMCUSTOM{nickname}’);
It works if the field exists. But when the field does not exist it returns something like this:
<div id=”em-booking” class=”em-booking css-booking”>
<p>Booking is closed.</p>
</div>CUSTOM{nickname}- This reply was modified 7 years, 1 month ago by adirdal.
Thanks
I’m starting to figure this out, but I’m having some issues checking if the custom field exists or not.
$nickname = $EM_Booking->output(‘#_BOOKINGFORMCUSTOM{mynickname}’);
$nickname is not empty if the field ‘mynickname’ does not exist, but is:
<div id=”em-booking” class=”em-booking css-booking”>
<p>Booking is closed.</p>
</div>CUSTOM{mynickname}- This reply was modified 7 years, 1 month ago by adirdal.