Class: Simplepay::Services::MarketplacePolicy

Inherits:
Simplepay::Service show all
Defined in:
lib/simplepay/services/marketplace_policy.rb

Overview

The Amazon Simple Pay Marketplace Policy service is used to allow sellers to acknowledge marketplace policy fees. Only once a set policy has been agreed to will marketplace transactions be able to proceed.

Simple Pay Marketplace Policy Fields

Required Fields

The following attributes are required when creating a Simple Pay Marketplace policy fee acceptance form (in addition to those listed in Simplepay::Service):

max_fixed_fee

The maximum fixed fee that will be appended to transactions.

max_variable_fee

The maximum variable fee (%) that will be calculated and added to transactions.

return_url

Fully-qualified URL for where to send they buyer following payment.

reference_id

A custom string used to identify this transaction, it will be returned with return data.

Example

(in your view, using the form helper)

<%= simplepay_form_for(:marketplace_policy, {
  :max_fixed_fee => 10.00,
  :max_variable_fee => 5,
  :return_url => 'http://yourservice.com',
  :reference_id => '123456789'
}) %>

Constant Summary collapse

ENDPOINT_URL =

Fully-qualified URL for the production endpoint for the service.

'https://authorize.payments.amazon.com/cobranded-ui/actions/start'
SANDBOX_URL =

Fully-qualified URL for the sandbox (test) endpoint for the service.

'https://authorize.payments-sandbox.amazon.com/cobranded-ui/actions/start'

Method Summary

Methods inherited from Simplepay::Service

field, fields, #fields, #form, required_field, set_submit_tag, submit_tag, #url