[Paid] 💵 PayPal Extension to add payment system in you app

Extension Overview:

The "PayPal Extension By @Black_Knight " is your entry point for incorporating PayPal's strength into your App Inventor applications. With the help of this dynamic plugin, the PayPal API may be easily accessed by your apps. Its clever construction makes it simple to retrieve access tokens using client credentials, bringing up a plethora of options for creating payment features.

:credit_card: PayPal Extension for MIT App Inventor

A comprehensive PayPal integration extension for MIT App Inventor that enables one-time payments, recurring subscriptions, refunds, invoices, and more - all with a simple, easy-to-use interface.

MIT App Inventor
PayPal API
License

blocks




image
image

image

image
image


:clipboard: Table of Contents


:sparkles: Features

:moneybag: One-Time Payments

  • Traditional Payment Flow - Create payments with approval URL
  • WebView Integration - Built-in seamless payment experience with auto-capture
  • Direct Credit Card Payments - Process cards without redirect
  • Payment Status Tracking - Check payment state in real-time
  • Refunds - Full and partial refund support
    image

:arrows_counterclockwise: Subscription System

  • Product & Plan Management - Create subscription products and billing plans
  • Flexible Billing - Daily, weekly, monthly, or yearly cycles
  • Customer Subscriptions - Easy subscription creation and management
  • Status Monitoring - Track active, cancelled, suspended subscriptions
  • Cancellation - Cancel subscriptions programmatically
    image
    image

:e-mail: Additional Features

  • Email Payments - Send money to PayPal email addresses
  • Invoice Creation - Generate and send invoices
  • Payment Extraction - Parse payment IDs, payer IDs, amounts, currencies
  • Multi-Environment - Sandbox and Live mode support

:package: Installation

Step 1: Download Extension

Download the latest .aix file from the releases page or build from source using Rush.

Step 2: Import to MIT App Inventor

  1. Open your MIT App Inventor project
  2. Go to ExtensionsImport Extension
  3. Choose the downloaded .aix file
  4. The PayPal extension will appear in your palette

Step 3: Add to Your Screen

Drag the PayPal component from the Extensions section to your screen (non-visible component).


:rocket: Quick Start

Get Your PayPal API Credentials

  1. Go to PayPal Developer Dashboard
  2. Create a Sandbox account for testing
  3. Create an app to get your Client ID and Client Secret

Basic Payment Example

// Screen Initialize
When Screen1.Initialize:
  Set PayPal1.ClientId to "YOUR_CLIENT_ID"
  Set PayPal1.ClientSecret to "YOUR_CLIENT_SECRET"
  Call PayPal1.GetAccessToken(isLive = false)

// When token is obtained
When PayPal1.AccessTokenObtained(accessToken, appId, expiresIn, respondCode):
  Set global token to accessToken
  // Now you can make payments!

// Make a payment
When btnPay.Click:
  Call PayPal1.MakePayPalPayment(
    accessToken = global token,
    amount = 50.00,
    currency = "USD",
    productName = "Premium Subscription",
    productDescription = "1 month access",
    returnUrl = "https://example.com/success",
    cancelUrl = "https://example.com/cancel",
    isLive = false
  )

// Payment created
When PayPal1.PaymentInfoObtained(jsonResponse):
  Set approvalUrl to PayPal1.ExtractHrefFromResponse(jsonResponse)
  // Open approvalUrl in browser or WebView

:books: API Reference

Authentication

GetAccessToken(isLive: boolean)

Obtains an access token from PayPal. Must be called first before any API operations.

Parameters:

  • isLive - false for sandbox testing, true for production

Triggers: AccessTokenObtained event

Example:

Call PayPal1.GetAccessToken(isLive = false)

One-Time Payments

MakePayPalPayment(...)

Creates a PayPal payment and returns approval URL for traditional flow.

Parameters:

  • accessToken - Valid access token from GetAccessToken
  • amount - Payment amount (e.g., 29.99)
  • currency - 3-letter currency code (USD, EUR, GBP, etc.)
  • productName - Name of product/service
  • productDescription - Description
  • returnUrl - Success redirect URL
  • cancelUrl - Cancellation URL
  • isLive - Environment mode

Triggers: PaymentInfoObtained event

Workflow:

  1. Call MakePayPalPayment
  2. Extract approval URL from response
  3. Redirect user to approval URL
  4. User approves payment
  5. Extract paymentId and PayerID from return URL
  6. Call CaptureAmount to finalize payment

StartPayPalPaymentInWebView(...)

Recommended Method - Creates payment with built-in WebView for seamless experience. Automatically captures payment!

Parameters:

  • All parameters from MakePayPalPayment
  • container - VerticalArrangement or HorizontalArrangement to display WebView

Triggers:

  • PaymentInWebViewSucceeded - Auto-captured!
  • PaymentInWebViewCancelled
  • PaymentInWebViewError

Example:

Call PayPal1.StartPayPalPaymentInWebView(
  accessToken = global token,
  amount = 50.00,
  currency = "USD",
  productName = "Premium Access",
  productDescription = "1 month",
  returnUrl = "https://example.com/success",
  cancelUrl = "https://example.com/cancel",
  isLive = false,
  container = VerticalArrangement1
)

CaptureAmount(paymentId, payerId, accessToken, isLive)

Captures/executes a payment after user approval. Finalizes the transaction.

Triggers: AmountCaptured event


RunPayPalCreditCardPayment(...)

Processes direct credit card payment without user redirect.

Parameters:

  • accessToken - Valid token
  • cardNumber - 16-digit card number
  • cardType - visa, mastercard, amex, discover
  • expireMonth - 01-12
  • expireYear - 4 digits (2025)
  • cvv2 - 3-4 digit security code
  • firstName - Cardholder first name
  • lastName - Cardholder last name
  • amount - Payment amount
  • currency - Currency code
  • paymentDescription - Transaction description
  • isLive - Environment mode

Triggers: CreditCardPaymentResponse event


Subscription System

CreateProduct(accessToken, productName, productDescription, productType, productCategory, isLive)

Creates a catalog product. Required before creating subscription plans.

Parameters:

  • productType - SERVICE, DIGITAL, or PHYSICAL
  • productCategory - SOFTWARE, ELECTRONICS, BOOKS, etc.

Triggers: ProductCreated event (save the productId!)

Example:

Call PayPal1.CreateProduct(
  accessToken = global token,
  productName = "Premium Membership",
  productDescription = "Access to all features",
  productType = "SERVICE",
  productCategory = "SOFTWARE",
  isLive = false
)

CreateSubscriptionPlan(...)

Creates a subscription billing plan with recurring payments.

Parameters:

  • accessToken - Valid token
  • productId - From CreateProduct
  • planName - Plan name (e.g., "Basic Monthly")
  • description - Plan description
  • billingFrequency - MONTH, YEAR, WEEK, or DAY
  • billingInterval - Number of intervals (1 = monthly, 3 = quarterly, 12 = yearly)
  • amount - Recurring payment amount per cycle
  • currency - Currency code
  • isLive - Environment mode

Triggers: PlanCreated event (save the planId!)

Example:

// Monthly plan
Call PayPal1.CreateSubscriptionPlan(
  accessToken = global token,
  productId = global productId,
  planName = "Basic Monthly",
  description = "$9.99/month",
  billingFrequency = "MONTH",
  billingInterval = 1,
  amount = 9.99,
  currency = "USD",
  isLive = false
)

// Yearly plan (save money!)
Call PayPal1.CreateSubscriptionPlan(
  accessToken = global token,
  productId = global productId,
  planName = "Premium Yearly",
  description = "$99.99/year",
  billingFrequency = "YEAR",
  billingInterval = 1,
  amount = 99.99,
  currency = "USD",
  isLive = false
)

CreateSubscription(...)

Creates a subscription for a customer. Generates approval URL.

Parameters:

  • accessToken - Valid token
  • planId - From CreateSubscriptionPlan
  • subscriberEmail - Customer email (optional)
  • subscriberName - Customer name (optional, format: "First Last")
  • returnUrl - Success redirect URL
  • cancelUrl - Cancel URL
  • isLive - Environment mode

Triggers: SubscriptionCreated event with approvalUrl

Example:

Call PayPal1.CreateSubscription(
  accessToken = global token,
  planId = global monthlyPlanId,
  subscriberEmail = txtEmail.Text,
  subscriberName = txtName.Text,
  returnUrl = "https://example.com/subscribed",
  cancelUrl = "https://example.com/cancel",
  isLive = false
)

When PayPal1.SubscriptionCreated(subscriptionId, status, approvalUrl, jsonResponse):
  // Save subscriptionId to database!
  Set global currentSubId to subscriptionId
  // Open approvalUrl for customer to approve
  Call ActivityStarter to open approvalUrl

GetSubscriptionDetails(accessToken, subscriptionId, isLive)

Retrieves subscription status and billing information.

Triggers: SubscriptionDetailsReceived event

Statuses:

  • APPROVAL_PENDING - Waiting for customer approval
  • APPROVED - Approved but not yet active
  • ACTIVE - Subscription is active and billing
  • SUSPENDED - Payment issues
  • CANCELLED - Cancelled by user or merchant
  • EXPIRED - Subscription expired

Example:

// Check if user has active subscription
Call PayPal1.GetSubscriptionDetails(
  accessToken = global token,
  subscriptionId = global userSubscriptionId,
  isLive = false
)

When PayPal1.SubscriptionDetailsReceived(subscriptionId, status, planId, jsonResponse):
  If status = "ACTIVE":
    // Grant premium access
    Set Screen1.BackgroundColor to green
  Else:
    // Show subscribe button
    Set btnSubscribe.Visible to true

CancelSubscription(accessToken, subscriptionId, reason, isLive)

Cancels an active subscription. Cannot be undone!

Triggers: SubscriptionCancelled event

Example:

Call PayPal1.CancelSubscription(
  accessToken = global token,
  subscriptionId = global currentSubId,
  reason = "Customer requested cancellation",
  isLive = false
)

GetPlanDetails(accessToken, planId, isLive)

Retrieves plan information including status, billing cycles, and pricing.

Triggers: PlanDetailsReceived event

Plan Statuses:

  • CREATED - Plan created but not activated
  • ACTIVE - Plan is active
  • INACTIVE - Plan is deactivated

ActivateSubscriptionPlan(accessToken, planId, isLive)

Activates a plan that was created with CREATED status. Usually not needed as CreateSubscriptionPlan creates plans as ACTIVE by default.

Triggers: PlanActivated event


Payment Management

CheckPaymentStatus(paymentId, accessToken, isLive)

Retrieves detailed payment status and information.

Triggers: PaymentStatusReceived event


RefundPayment(accessToken, paymentId, amount, currency, reason, isLive)

Issues a full or partial refund.

Parameters:

  • paymentId - Sale ID (use ExtractSaleId from capture response)
  • amount - Refund amount (0 for full refund)
  • reason - Refund reason (optional)

Triggers: RefundProcessed or RefundError event

Example:

// Full refund
Call PayPal1.RefundPayment(
  accessToken = global token,
  paymentId = global saleId,
  amount = 0,
  currency = "USD",
  reason = "Customer returned product",
  isLive = false
)

// Partial refund
Call PayPal1.RefundPayment(
  accessToken = global token,
  paymentId = global saleId,
  amount = 10.00,
  currency = "USD",
  reason = "Partial refund for damaged item",
  isLive = false
)

MakePaymentToEmail(...)

Sends money to a PayPal email address.

Parameters:

  • recipientEmail - Recipient's PayPal email
  • amount - Amount to send
  • note - Payment note/description

Triggers: PaymentToEmailResponse event with approval URL


CreateInvoice(...)

Creates a PayPal invoice for a customer.

Triggers: InvoiceCreated event


Utility Functions

ExtractHrefFromResponse(jsonResponse): string

Extracts the PayPal approval URL from payment response.

ExtractPaymentIdFromUrl(url): string

Extracts payment ID from return URL after PayPal redirect.

ExtractPayerIdFromUrl(url): string

Extracts payer ID from return URL.

ExtractIdFromResponse(jsonResponse): string

Extracts payment ID from JSON response.

ExtractSaleId(jsonResponse): string

Extracts sale ID from capture response (needed for refunds).

ExtractCurrencyCode(jsonResponse): string

Extracts currency code from payment response.

ExtractPrice(jsonResponse): string

Extracts total amount from payment response.

ExtractResponseCode(jsonResponse): int

Extracts state code from response.

ClosePaymentWebView()

Manually closes the payment WebView.


:arrows_counterclockwise: Complete Workflows

:one: One-Time Payment (WebView - Recommended)

// Setup
When Screen1.Initialize:
  Set PayPal1.ClientId to "YOUR_CLIENT_ID"
  Set PayPal1.ClientSecret to "YOUR_CLIENT_SECRET"
  Call PayPal1.GetAccessToken(isLive = false)

When PayPal1.AccessTokenObtained(accessToken, appId, expiresIn, respondCode):
  Set global token to accessToken

// Make Payment
When btnCheckout.Click:
  Call PayPal1.StartPayPalPaymentInWebView(
    accessToken = global token,
    amount = 50.00,
    currency = "USD",
    productName = "Premium Feature",
    productDescription = "Unlock all features",
    returnUrl = "https://example.com/success",
    cancelUrl = "https://example.com/cancel",
    isLive = false,
    container = VerticalArrangement1
  )

// Success (auto-captured!)
When PayPal1.PaymentInWebViewSucceeded(paymentId, payerId):
  Show notification: "Payment successful!"
  Grant access to premium features

// Wait for final confirmation
When PayPal1.AmountCaptured(success, response):
  If success:
    Save payment to database
    Show confirmation screen

:two: Subscription System (Complete)

// ONE-TIME SETUP: Create Product and Plans
When btnSetup.Click:
  Call PayPal1.GetAccessToken(isLive = false)

When PayPal1.AccessTokenObtained(accessToken, appId, expiresIn, respondCode):
  Set global token to accessToken
  // Create product
  Call PayPal1.CreateProduct(
    accessToken = global token,
    productName = "Premium Membership",
    productDescription = "All features unlocked",
    productType = "SERVICE",
    productCategory = "SOFTWARE",
    isLive = false
  )

When PayPal1.ProductCreated(productId, jsonResponse):
  Set global productId to productId
  Store productId in TinyDB with tag "product_id"
  // Create monthly plan
  Call PayPal1.CreateSubscriptionPlan(
    accessToken = global token,
    productId = productId,
    planName = "Monthly Plan",
    description = "$9.99/month",
    billingFrequency = "MONTH",
    billingInterval = 1,
    amount = 9.99,
    currency = "USD",
    isLive = false
  )

When PayPal1.PlanCreated(planId, planStatus, jsonResponse):
  Set global monthlyPlanId to planId
  Store planId in TinyDB with tag "monthly_plan_id"
  Show notification: "Plans created successfully!"

// CUSTOMER SUBSCRIBES
When btnSubscribe.Click:
  Set planId to TinyDB.GetValue("monthly_plan_id")
  Call PayPal1.CreateSubscription(
    accessToken = global token,
    planId = planId,
    subscriberEmail = txtEmail.Text,
    subscriberName = txtName.Text,
    returnUrl = "https://example.com/subscribed",
    cancelUrl = "https://example.com/cancel",
    isLive = false
  )

When PayPal1.SubscriptionCreated(subscriptionId, status, approvalUrl, jsonResponse):
  Set global currentSubId to subscriptionId
  Store subscriptionId in TinyDB with tag "subscription_" + txtEmail.Text
  // Open approval URL
  Call ActivityStarter to open approvalUrl

// CHECK SUBSCRIPTION STATUS
When Screen1.Initialize:
  Set subId to TinyDB.GetValue("subscription_" + userEmail)
  If subId is not empty:
    Call PayPal1.GetSubscriptionDetails(
      accessToken = global token,
      subscriptionId = subId,
      isLive = false
    )

When PayPal1.SubscriptionDetailsReceived(subscriptionId, status, planId, jsonResponse):
  If status = "ACTIVE":
    Grant premium access
    Hide subscribe buttons
  Else:
    Show subscribe buttons
    Remove premium access

// CANCEL SUBSCRIPTION
When btnCancel.Click:
  Call PayPal1.CancelSubscription(
    accessToken = global token,
    subscriptionId = global currentSubId,
    reason = "User requested",
    isLive = false
  )

When PayPal1.SubscriptionCancelled(subscriptionId):
  Show notification: "Subscription cancelled"
  Update database

:three: Refund Processing

When btnRefund.Click:
  // Extract sale ID from original capture response
  Set saleId to PayPal1.ExtractSaleId(global captureResponse)
  
  // Full refund
  Call PayPal1.RefundPayment(
    accessToken = global token,
    paymentId = saleId,
    amount = 0,
    currency = "USD",
    reason = "Customer returned product",
    isLive = false
  )

When PayPal1.RefundProcessed(id, state, total, currency, reason):
  Show notification: "Refund of " + total + " " + currency + " processed"
  Update order status to "Refunded"

:satellite: Events Reference

Authentication Events

  • AccessTokenObtained(accessToken, appId, expiresIn, respondCode)

Payment Events

  • PaymentInfoObtained(jsonResponse)
  • CreditCardPaymentResponse(responseCode, jsonResponse)
  • AmountCaptured(success, response)
  • PaymentStatusReceived(paymentId, id, intent, state, createTime, updateTime, jsonResponse)
  • PaymentToEmailResponse(success, jsonResponse, redirectUrl)

WebView Payment Events

  • PaymentInWebViewSucceeded(paymentId, payerId) - Auto-captured!
  • PaymentInWebViewCancelled()
  • PaymentInWebViewError(errorMessage)

Subscription Events

  • ProductCreated(productId, jsonResponse)
  • ProductCreationError(error, errorDescription)
  • PlanCreated(planId, planStatus, jsonResponse)
  • PlanCreationError(error, errorDescription)
  • PlanActivated(planId)
  • PlanActivationError(error, errorDescription)
  • PlanDetailsReceived(planId, planName, status, description, jsonResponse)
  • PlanDetailsError(error, errorDescription)
  • SubscriptionCreated(subscriptionId, status, approvalUrl, jsonResponse)
  • SubscriptionCreationError(error, errorDescription)
  • SubscriptionDetailsReceived(subscriptionId, status, planId, jsonResponse)
  • SubscriptionDetailsError(error, errorDescription)
  • SubscriptionCancelled(subscriptionId)
  • SubscriptionCancellationError(error, errorDescription)

Refund Events

  • RefundProcessed(id, state, total, currency, reason)
  • RefundError(error, errorDescription)

Invoice Events

  • InvoiceCreated(success, response)

:bulb: Best Practices

1. Environment Management

// Use sandbox for testing
Set global IS_LIVE to false

// Switch to production when ready
Set global IS_LIVE to true

2. Token Management

// Access token expires in ~9 hours
// Store token and expiry time
When PayPal1.AccessTokenObtained(accessToken, appId, expiresIn, respondCode):
  Set global token to accessToken
  Set global tokenExpiry to (CurrentTime + expiresIn)

// Refresh before making API calls
Procedure CheckToken:
  If CurrentTime > global tokenExpiry - 300:  // 5 min buffer
    Call PayPal1.GetAccessToken(isLive = global IS_LIVE)

3. Error Handling

// Always handle errors
When PayPal1.PaymentInWebViewError(errorMessage):
  Show notification: errorMessage
  Log error to database
  Show retry button

When PayPal1.SubscriptionCreationError(error, errorDescription):
  If error contains "INVALID_TOKEN":
    Call PayPal1.GetAccessToken and retry
  Else:
    Show error to user

4. Data Storage

// Store critical IDs securely
- Product IDs (one-time)
- Plan IDs (one-time)
- Customer subscription IDs (per user)
- Access token (temporary, refresh regularly)

// Use Firebase or secure database for production

5. Subscription Status Checks

// Check on app launch
When Screen1.Initialize:
  CheckSubscriptionStatus()

// Periodic checks (optional)
When Clock1.Timer:  // Every 24 hours
  CheckSubscriptionStatus()

6. WebView vs Traditional Flow

// Use WebView for better UX (recommended)
Call StartPayPalPaymentInWebView(...)

// Use traditional flow if WebView not suitable
Call MakePayPalPayment(...)
// Then handle redirect manually

:wrench: Troubleshooting

Common Issues

1. "INVALID_TOKEN" Error

Cause: Access token expired or invalid

Solution:

Call PayPal1.GetAccessToken(isLive = false)
// Wait for AccessTokenObtained event, then retry

2. WebView Not Showing

Cause: Container not set correctly

Solution:

// Ensure you pass a VerticalArrangement or HorizontalArrangement
Call PayPal1.StartPayPalPaymentInWebView(
  ...
  container = VerticalArrangement1  // Make sure this exists!
)

3. Subscription Not Activating

Cause: Customer hasn't approved yet

Solution:

// Check status after customer returns
Call PayPal1.GetSubscriptionDetails(...)

When SubscriptionDetailsReceived(..., status, ...):
  If status = "APPROVAL_PENDING":
    Show message: "Please complete payment approval"
  Else If status = "ACTIVE":
    Grant access

4. "Product not found" When Creating Plan

Cause: Invalid product ID

Solution:

// Ensure you saved and are using the correct product ID
When PayPal1.ProductCreated(productId, jsonResponse):
  Store productId in TinyDB  // Don't lose this!

5. Refund Fails

Cause: Using payment ID instead of sale ID

Solution:

// Extract sale ID from capture response first
Set saleId to PayPal1.ExtractSaleId(captureResponse)
Call PayPal1.RefundPayment(paymentId = saleId, ...)

:iphone: Examples

Example 1: Simple Donation App

// User enters donation amount
When btnDonate.Click:
  Call PayPal1.StartPayPalPaymentInWebView(
    accessToken = global token,
    amount = txtAmount.Text,
    currency = "USD",
    productName = "Donation",
    productDescription = "Support our cause",
    returnUrl = "https://example.com/thanks",
    cancelUrl = "https://example.com/cancel",
    isLive = false,
    container = VerticalArrangement1
  )

When PayPal1.PaymentInWebViewSucceeded(paymentId, payerId):
  Show notification: "Thank you for your donation!"
  Send thank you email

Example 2: Premium Feature Unlock

// User buys premium feature
When btnUnlockPremium.Click:
  Call PayPal1.StartPayPalPaymentInWebView(
    accessToken = global token,
    amount = 4.99,
    currency = "USD",
    productName = "Premium Features",
    productDescription = "Unlock all premium features",
    returnUrl = "https://example.com/success",
    cancelUrl = "https://example.com/cancel",
    isLive = false,
    container = WebViewContainer
  )

When PayPal1.AmountCaptured(success, response):
  If success:
    Store "premium" = true in TinyDB
    Reload screen with premium features enabled

Example 3: Netflix-Style Subscription

// Monthly and Yearly plans
When btnMonthly.Click:
  Set selectedPlan to TinyDB.GetValue("monthly_plan_id")
  SubscribeUser(selectedPlan)

When btnYearly.Click:
  Set selectedPlan to TinyDB.GetValue("yearly_plan_id")
  SubscribeUser(selectedPlan)

Procedure SubscribeUser(planId):
  Call PayPal1.CreateSubscription(
    accessToken = global token,
    planId = planId,
    subscriberEmail = txtEmail.Text,
    subscriberName = txtName.Text,
    returnUrl = "myapp://subscribed",
    cancelUrl = "myapp://cancel",
    isLive = false
  )

// After subscription
When SubscriptionCreated(...):
  Navigate to content screen
  Show premium content

:closed_lock_with_key: Security Considerations

  1. Never hardcode credentials - Use environment variables or secure storage
  2. Validate on server-side - Don't trust client-side subscription checks alone
  3. Use HTTPS - Always use secure URLs for return/cancel URLs
  4. Test in sandbox first - Never test with real money
  5. Handle webhooks (advanced) - Use PayPal webhooks for real-time updates
  6. Store sensitive data securely - Use Firebase or encrypted storage

:globe_with_meridians: Going Live

Before Production:

  1. :white_check_mark: Test thoroughly in sandbox mode
  2. :white_check_mark: Create production PayPal app credentials
  3. :white_check_mark: Update ClientId and ClientSecret to production values
  4. :white_check_mark: Change all isLive = false to isLive = true
  5. :white_check_mark: Update return/cancel URLs to production URLs
  6. :white_check_mark: Set up proper error logging
  7. :white_check_mark: Implement server-side validation (recommended)
  8. :white_check_mark: Set up PayPal webhooks for automatic updates

steps in one image :

Remember:

  • You'll need to obtain your PayPal client ID and client secret from the PayPal Developer Dashboard.

  • Carefully review PayPal's API documentation for specific requirements and limitations of each API call.

I hope this explanation helps you understand and use the PayPal Extension effectively in your App Inventor projects!

preview video:

Test

Preview image
successful payment in live mode

Extension:

you will get aix file in addition to aia file that contains methods of installing the extension inside your project

You can buy it via PayPal it costs 8$ instead of 12$ after your payment you will be directed to the download URL of the zip file that contains aix and aia project. This offer valid for a limited duration

© 2023 MrKoder. All rights reserved.

For inquiries, please contact: Mr koder

Visit our YouTube channel: Mr Koder's YouTube Channel

5 Likes

Also see here:

1 Like

Extension updated to include Test with sandbox in addition to Livemode

Topic updated with new functions now extension working fine

Hey @Black_Knight, I had a question:

Can the user change the amount after the payment flow has been initiated?
If no then what is the purpose of the AmountCaptured block? If the amount is fixed already then why would we want to capture it again?

Lets say that I want to sell a service to a user for a specific fixed price, I will not want the user to edit it. Which is what led me to asking this question.

Thanks!

No he cant but he has the option to pay them part by part .

the purpose of this block is just an authentication step that you run to send for PayPal to authenticate that you are the seller.
And this is their system I am not the creator of this system.

1 Like

Oh okay I asked it since I did not see you use this block in your YouTube video. Thanks though!

1 Like

Olá, posso utilizar esta extenção para conta normal do paypal, que não seja uma conta corporativa?

No, you can't . cause only business accounts that offer API .

this offer is valid for a limited duration

looks just like a webviewer component running a paypal payment system to me

@Black_Knight Your Extension link is available for free through the link of the tutorial video, i think you forget to delete it :innocent:

1 Like

This is old free version

1 Like

The topic is fully updated with these new three useful functions

1 Like

:dart: New Features in PayPal Extension 2.0:

1. Built-In WebView Integration :globe_with_meridians:

  • Payments happen inside your app (no external browser)
  • Automatically captures and verifies payments
  • User never leaves your app

2. Subscription WebView :arrows_counterclockwise:

  • CreateSubscriptionInWebView function
  • Customer subscribes entirely in-app
  • Automatically verifies subscription is ACTIVE
  • Seamless Netflix-style experience

3. Simplified Workflow :zap:

  • Before: 8 steps, external browser, manual verification
  • Now: 3 steps, in-app, automatic verification
  • 70% less code required

4. Complete Subscription System :credit_card:

  • Create products and billing plans
  • Support for daily/weekly/monthly/yearly billing
  • Automatic subscription status checking
  • Cancel subscriptions programmatically
  • Check plan details and activation status

5. New Functions Added:

  • CreateSubscriptionInWebView - Main subscription with WebView
  • GetSubscriptionDetails - Check subscription status
  • CancelSubscription - Cancel active subscriptions
  • GetPlanDetails - Check plan status
  • CreateProduct - Create catalog products
  • CreateSubscriptionPlan - Create billing plans
  • ActivateSubscriptionPlan - Activate plans

6. Enhanced WebView Events:

  • SubscriptionInWebViewActivated - Subscription is active
  • SubscriptionInWebViewCancelled - User cancelled
  • SubscriptionInWebViewError - Error occurred
  • Auto-triggers when payment/subscription completes