Forum

Thread tagged as: Runway, Shop

Skip checkout

With Perch Shop how do you skip payment for certain users and simply add the order automatically?

Lexi McGee

Lexi McGee 3 points

  • 4 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

You can use the manual checkout for that.

Thanks Rachel

For some reason this code doesn't work when the member has the reseller tag. It goes to the ''regular'' payment processor

if (perch_member_has_tag('reseller')) {

  // your 'success' return URL
  $return_url = 'https://website.com/thanks';
  $cancel_url = 'https://website.com';

  perch_shop_checkout('manual', [
    'return_url' => $return_url,
    'cancel_url' => $cancel_url,
  ]);
}

else {

    perch_shop_checkout('our-regular-processor', [
    'return_url' => '/payment/success',
    'cancel_url' => '/payment/failure',
    ]);

}
Drew McLellan

Drew McLellan 2638 points
Perch Support

Have you checked if the member is logged in?

Of course. Otherwise the process wouldn't go through.

In fact

if (perch_member_has_tag('reseller')) {
echo "is reseller";
} else {
echo "regular member";
}

Works as intended

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, great.