Skip to content

Commit

Permalink
Replaced alipay domain name
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenghui97 committed May 17, 2024
1 parent f1c30b9 commit 06b75b0
Show file tree
Hide file tree
Showing 6 changed files with 170 additions and 154 deletions.
16 changes: 8 additions & 8 deletions doc/legacy_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Alipay::Service.create_partner_trade_by_buyer_url(
return_url: 'https://example.com/orders/20150401000-0001',
notify_url: 'https://example.com/orders/20150401000-0001/notify'
)
# => 'https://mapi.alipay.com/gateway.do?service=create_partner_trade_by_buyer&...'
# => 'https://api-sea-global.alipayplus.com/gateway.do?service=create_partner_trade_by_buyer&...'
```

Guide consumer to this address to complete payment
Expand Down Expand Up @@ -277,7 +277,7 @@ Alipay::Service.refund_fastpay_by_platform_pwd_url(
}],
notify_url: 'https://example.com/orders/20150401000-0001/refund_notify'
)
# => https://mapi.alipay.com/gateway.do?service=refund_fastpay_by_platform_pwd&...
# => https://api-sea-global.alipayplus.com/gateway.do?service=refund_fastpay_by_platform_pwd&...
```

#### Arguments
Expand Down Expand Up @@ -389,7 +389,7 @@ Alipay::Service.create_forex_trade_url(
total_fee: '10.00',
notify_url: 'https://example.com/orders/20150401000-0001/notify'
)
# => 'https://mapi.alipay.com/gateway.do?service=create_forex_trade...'
# => 'https://api-sea-global.alipayplus.com/gateway.do?service=create_forex_trade...'
```

#### ARGUMENTS
Expand Down Expand Up @@ -498,7 +498,7 @@ Alipay::Service.batch_trans_notify_url(
batch_fee: 1000.00,
email: '[email protected]'
)
#=> 'https://mapi.alipay.com/gateway.do?service=batch_trans_notify&...'
#=> 'https://api-sea-global.alipayplus.com/gateway.do?service=batch_trans_notify&...'
```

#### Arguments
Expand Down Expand Up @@ -572,7 +572,7 @@ create_qr_code_params = {
}

Alipay::Service.create_merchant_qr_code(create_qr_code_params)
# => 'https://mapi.alipay.com/gateway.do?service=alipay.commerce.qrcode.create...'
# => 'https://api-sea-global.alipayplus.com/gateway.do?service=alipay.commerce.qrcode.create...'
```

#### ARGUMENTS
Expand Down Expand Up @@ -633,7 +633,7 @@ update_qr_code_params = {
}

Alipay::Service.update_merchant_qr_code(update_qr_code_params)
# => 'https://mapi.alipay.com/gateway.do?service=alipay.commerce.qrcode.modify...'
# => 'https://api-sea-global.alipayplus.com/gateway.do?service=alipay.commerce.qrcode.modify...'
```

#### ARGUMENTS
Expand Down Expand Up @@ -683,7 +683,7 @@ acquirer_overseas_query_params = {
}

Alipay::Service.acquirer_overseas_query(acquirer_overseas_query_params)
# => 'https://mapi.alipay.com/gateway.do?service=alipay.acquire.overseas.query...'
# => 'https://api-sea-global.alipayplus.com/gateway.do?service=alipay.acquire.overseas.query...'
```

#### ARGUMENTS
Expand Down Expand Up @@ -720,7 +720,7 @@ acquirer_overseas_spot_refund_params = {
}

Alipay::Service.acquirer_overseas_spot_refund_url(acquirer_overseas_spot_refund_params)
# => 'https://mapi.alipay.com/gateway.do?service=alipay.acquire.overseas.spot.refund...'
# => 'https://api-sea-global.alipayplus.com/gateway.do?service=alipay.acquire.overseas.spot.refund...'
```

#### ARGUMENTS
Expand Down
6 changes: 3 additions & 3 deletions lib/alipay/notify.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ def self.verify?(params, options = {})
end

def self.verify_notify_id?(pid, notify_id)
uri = URI("https://mapi.alipay.com/gateway.do")
uri = URI('https://api-sea-global.alipayplus.com/gateway.do')
uri.query = URI.encode_www_form(
'service' => 'notify_verify',
'partner' => pid,
'service' => 'notify_verify',
'partner' => pid,
'notify_id' => notify_id
)
Net::HTTP.get(uri) == 'true'
Expand Down
Loading

0 comments on commit 06b75b0

Please sign in to comment.