Library used
PayPal v6 via paypal-js
import { loadCoreSdkScript } from '@paypal/paypal-js/sdk-v6';
const paypalScript = await loadCoreSdkScript({ environment: 'sandbox' });
const paypalSdk = await paypalScript.createInstance({
clientId: paypalClientId,
components: ['paypal-payments', 'venmo-payments'],
pageType: 'checkout',
});
🐞 Describe the Bug
I am adding PayPal and Venmo buttons to my checkout flow. I got everything working with createPayPalOneTimePaymentSession().
I tried to use createVenmoOneTimePaymentSession(), but got an error: shipping callbacks not supported for flow: venmo.
The docs say, and I quote:
The parameters are identical to createPayPalOneTimePaymentSession. Venmo sessions support the same callbacks and flow options.
🔬 Minimal Reproduction
The buttons:
<div class="tw-mb-2 tw-grid tw-grid-cols-1 tw-gap-2 min-[468px]:tw-grid-cols-2">
<paypal-button
type="checkout"
class="paypal-gold tw-h-[42px] tw-w-full"
@click="initPaypal"
></paypal-button>
<venmo-button
type="checkout"
class="venmo-blue tw-h-[42px] tw-w-full"
@click="initVenmo"
></venmo-button>
</div>
The JavaScript:
{
get payPalOptions() {
return {
async onShippingAddressChange({orderId, shippingAddress}) {},
async onShippingOptionsChange({orderId, selectedShippingOption}) {},
async onApprove({orderId}) {}
onCancel() {}
};
},
async initPaypal() {
await paypalSdk.createPayPalOneTimePaymentSession(this.payPalOptions).start({ presentationMode: 'auto' }, this.getPaypalOrderId());
},
async initVenmo() {
await paypalSdk.createVenmoOneTimePaymentSession(this.payPalOptions).start({ presentationMode: 'auto' }, this.getPaypalOrderId());
},
}
😕 Actual Behavior
Venmo does not open, saying shipping callbacks not supported for flow: venmo.
🤔 Expected Behavior
The docs say:
Venmo sessions support the same callbacks and flow options.
So, I would assume that Venmo supports onShippingAddressChange and onShippingOptionsChange. I would assume that I wouldn't need to change the code to support Venmo.
🌍 Environment
@paypal/paypal-js: 9.2.0
- OS: Fedora 43 (KDE)
- Zen 1.18.3b (Firefox 147.0.2)
➕ Additional Context
Both onShippingAddressChange and onShippingOptionsChange work fine with PayPal.
Library used
PayPal v6 via
paypal-js🐞 Describe the Bug
I am adding PayPal and Venmo buttons to my checkout flow. I got everything working with
createPayPalOneTimePaymentSession().I tried to use
createVenmoOneTimePaymentSession(), but got an error:shipping callbacks not supported for flow: venmo.The docs say, and I quote:
🔬 Minimal Reproduction
The buttons:
The JavaScript:
😕 Actual Behavior
Venmo does not open, saying
shipping callbacks not supported for flow: venmo.🤔 Expected Behavior
The docs say:
So, I would assume that Venmo supports
onShippingAddressChangeandonShippingOptionsChange. I would assume that I wouldn't need to change the code to support Venmo.🌍 Environment
@paypal/paypal-js: 9.2.0➕ Additional Context
Both
onShippingAddressChangeandonShippingOptionsChangework fine with PayPal.