stripe微信付款接口

#composer require stripe/stripe-php

<?php
require_once('vendor/autoload.php');
Stripe\Stripe::setApiKey('sk_test_51zX1hSDCA8Q8MfjPdZLR7oFRlQeJQ1z1W1SoguoffuZbu2WfHyliWa3BAXie3ma45UAgIkQ369cR4bnRNSCh2e6200nbfrbxQb');

$source =  Stripe\Source::create(["type" => "wechat", "amount" => 20000,'currency' => 'usd', "metadata" => ["invoice_id" => 'test'],  'redirect'=> [ 'return_url'=>'https://www.xxx.host/callback.php?id=260040&amount=8120&currency=cny'  ]    ]);

?>

 

返回二维码连接

     [status] => pending
    [type] => wechat
    [usage] => single_use  
    [wechat] => Stripe\StripeObject Object
        (
            [qr_code_url] => https://stripe.com/sources/test_source?client_secret=src_client_secret_B6l7vfg6XqH7nXPRlFsAEj6r&source=src_1MKdUyDCAxQ8MBjPec73jd1Z
        )

stripe微信付款接口

1 条用户评论。
  1. 评论 发表时间:Monday 06th/03/2023 07:30:57 PM 1楼

    收藏了

添加新评论 »