3.5 KiB
3.5 KiB
Wise Payment Integration - README
🎉 Implementation Complete!
Your Wise payment integration is ready to use with the payment link your client provided.
📋 What You Have
A simplified Wise integration that:
- ✅ Redirects users to Wise payment links
- ✅ Tracks payment status in database
- ✅ Verifies payments before allowing card access
- ✅ Supports webhook notifications (optional)
- ✅ Works alongside existing Stripe integration
🚀 Quick Start
1. Add to .env:
WISE_PAYMENT_LINK_6_CARDS=https://wise.com/pay/r/W2k1NqQySdc9HW8
WISE_PAYMENT_LINK_18_CARDS=https://wise.com/pay/r/YOUR_OTHER_LINK
WISE_WEBHOOK_SECRET=
2. That's It!
Users can now:
- Select a paid card option
- Click "Wise" button (dark blue)
- Pay on Wise
- Return and verify payment
📚 Documentation
- WISE_SIMPLE_SETUP.md ← START HERE for step-by-step guide
- WISE_SETUP.md - Detailed technical setup
- WISE_FLOW_DIAGRAM.md - Visual flow diagrams
- WISE_IMPLEMENTATION_SUMMARY.md - What was built
🎯 Key Features
For Users
- Dual payment buttons: Stripe or Wise
- Seamless redirect to Wise
- Payment verification page
- Access to card drawing after payment
For You
- Simple configuration (just payment links)
- Database tracking of all payments
- Webhook support for automatic verification
- Easy testing without real payments
🔧 Technical Details
Routes
POST /create-wise-payment- Create payment & redirectGET /wise/verify- Verification pagePOST /wise/webhook- Webhook handlerGET /wise/validate-payment- Check payment status
Database
All payments stored in payments table with:
payment_provider= 'wise'status= 'pending' | 'succeeded' | 'failed'client_session_id= unique identifier
Security
- Payment verification before card access
- Webhook signature validation
- CSRF protection disabled for webhooks only
🧪 Testing
Without Real Payment
php artisan tinker
# Get latest Wise payment
$payment = App\Models\Payment::where('payment_provider', 'wise')
->latest()->first();
# Mark as succeeded
$payment->update(['status' => 'succeeded']);
With Real Payment
- Click "Wise" button
- Complete payment on Wise
- Visit
/wise/verify - System checks and confirms payment
📱 User Flow
Card Selection → Click Wise → Redirect to Wise → Complete Payment
↓
Payment Record Created (status: pending)
↓
User Returns → /wise/verify → Status Check
↓
If Paid → Success → Draw Cards!
🛠 Configuration
Required
WISE_PAYMENT_LINK_6_CARDS- Link for 6-card optionWISE_PAYMENT_LINK_18_CARDS- Link for 18-card option
Optional (for automatic verification)
WISE_WEBHOOK_SECRET- Webhook signature verification
💡 Tips
- Ask your client for the 18-card payment link
- Set up webhooks in production for automatic verification
- Test manually first with the simulated payment method
- Check logs if something doesn't work:
storage/logs/laravel.log
🆘 Common Issues
"Payment link not configured"
→ Add WISE_PAYMENT_LINK_6_CARDS to .env
Payment stuck on pending
→ Use php artisan tinker to manually mark as succeeded (for testing)
Webhook not firing
→ Check webhook URL is publicly accessible and secret is configured
✨ Next Steps
- ✅ Code is ready
- 📝 Add payment links to
.env - 🧪 Test the flow
- 🔗 Set up webhooks (production)
- 🎉 Go live!
Read WISE_SIMPLE_SETUP.md for the complete guide!