import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.*;
@RestController
public class CheckoutController {
@GetMapping("/checkout")
public Map checkout(
@RequestParam String products,
@RequestParam(required = false) String coupon) {
// Parse products
Map productQuantities = new HashMap<>();
for (String productEntry : products.split(",")) {
String[] parts = productEntry.split(":");
productQuantities.put(
parts[0], // Product ID
Integer.parseInt(parts[1]) // Quantity
);
}
// Build result
Map result = new HashMap<>();
result.put("products", productQuantities);
result.put("coupon", coupon != null ? coupon : "No coupon applied");
return result;
}
}
top of page
Yoga at ODP with AfroFit Sun, Aug 24
| Oakland Don't Play
We're hosting Yoga session at the Oakland Don't Play store and wellness market. Yoga session from 11-12:30 and immediately following refreshments and wellness market. There will be a massage therapist and other vendors to aid you on your wellness journey
Time & Location Aug 24, 2025, 10:30 AM – 2:00 PM
Oakland Don't Play, 1189 79th Ave, Oakland, CA 94621, USA
About the event Join us for a rejuvenating Yoga session hosted by Rose of AfroFit at the Oakland Don't Play store and wellness market!
Schedule What to Expect
Show More
bottom of page