Skip to content

Commit 9eaee05

Browse files
committed
fix: playground copy code uses proper callback names
1 parent 3dab4bd commit 9eaee05

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ NEXT_PUBLIC_DEMO_URL="https://calendly.com/mariana-rn/request-network-intro"
77
NEXT_PUBLIC_INTEGRATION_URL="https://docs.request.network/building-blocks/templates/request-checkout"
88
NEXT_PUBLIC_RN_API_CLIENT_ID="rn_f6mr53l2yfcdv4sych5adq7gez3avurq"
99
NEXT_PUBLIC_REQUEST_API_URL="https://api.stage.request.network"
10-
NEXT_PUBLIC_EASY_INVOICE_URL=https://easyinvoice.request.network
10+
NEXT_PUBLIC_EASY_INVOICE_URL="https://easyinvoice.request.network"

src/components/Playground/index.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,15 @@ export const Playground = () => {
142142
paymentConfig={${formatObject(cleanedPaymentConfig, 2)}}${formValues.uiConfig ? `
143143
uiConfig={${formatObject(formValues.uiConfig, 2)}}` : ''}
144144
receiptInfo={${formatObject(cleanedreceiptInfo, 2)}}
145-
onSuccess={() => {
146-
console.log('Payment successful');
145+
onPaymentSuccess={(requestId) => {
146+
console.log('Payment successful', requestId);
147147
}}
148-
onError={(error) => {
148+
onPaymentError={(error) => {
149149
console.error('Payment failed:', error);
150150
}}
151+
onComplete={() => {
152+
console.log('Payment process completed');
153+
}}
151154
>
152155
{/* Custom button example */}
153156
<div className="px-8 py-2 bg-[#099C77] text-white rounded-lg hover:bg-[#087f63] transition-colors text-center">

0 commit comments

Comments
 (0)